{
    "$schema": "http://json-schema.org/draft-07/schema",
    "$id": "https://burrito.bible/schema/agency.schema.json",
    "$$target": "agency.schema.json",
    "title": "Agency",
    "type": "object",
    "description": "Describes a particular agency that is involved with or related to the contents of the burrito.",
    "properties": {
        "id": {
            "$ref": "common.schema.json#/definitions/prefixedId"
        },
        "name": {
            "$ref": "common.schema.json#/definitions/localizedText"
        },
        "abbr": {
            "$ref": "common.schema.json#/definitions/localizedText"
        },
        "url": {
            "$ref": "common.schema.json#/definitions/url"
        },
        "roles": {
            "type": "array",
            "items": {
                "type": "string",
                "enum": ["rightsAdmin", "rightsHolder", "content", "publication", "management", "finance", "qa"]
            },
            "description": "A list of roles indicating in which respects this agency was involved with the production of this burrito.",
            "minItems": 1
        }
    },
    "required": ["id", "name", "roles"],
    "additionalProperties": false
}
