Add a tags property to Records

As a client of the OSDU I would like to add in free form tags to a Record to allow me to annotate and group data in dimensions that I choose. This is also very useful in when QC'ing data for example with data scientists to understand how data has been classified and if it is useful for their purposes.

I should be able to search for any of the tags that I add into the Record.

tags is an optional field at the same level as data, metadata and legaltag. The format of this field is designed as

Record

{
    "id": "..."
    "meta": {},
    "data": {},
    "acl": {},
    ...
    "tags": {
        "title": "Tags",
        "description": "An array of AbstractTagItems (key value). The array is treated as a set; AbstractTagItem.tagKeyID have to be unique in the array. Changing the record’s tags does not create a new record version.",
        "type": "array",
        "items": {
            "$ref": "../abstract/AbstractTagItem.json"
        }
    }
}

Here "AbstractTagItem.json" is

{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Tag Item",
    "description": "A tag key/value pair.",
    "type": "object",
    "properties": {
        "tagKeyID": {
            "title": "Tag Key",
            "description": "The reference to the TagKeyType catalog. The containing array is expected to be a set, i.e. tagKeyID must be unique in the et/array.",
            "type": "string",
            "pattern": "^srn:<namespace>:reference-data\\/TagKeyType:[^:]+:[0-9]*$"
        },
        "tagValue": {
            "title": "Tag Value",
            "description": "The value associated with the tag key.",
            "type": "string",
        }
    }
}

An example could be like

{
    "id": "..."
    "meta": {},
    "data": {},
    "acl": {},
    ...
    "tags": {
        "label1": "value1",
        "label2": "value2",
        ...
    }
}

The point here is that the tags are not predefined in schema. So it gives the flexibility for user to tag anything they want.

Edited by ethiraj krishnamanaidu