{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "id": "https://specs.openstack.org/openstack/service-types-authority/_downloads/schema.json#",
  "type": "object",
  "required": ["services"],
  "additionalProperties": false,
  "properties": {
    "services": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/service"
      }
    }
  },
   "definitions":{
      "service":{
         "properties": {
            "service_type": {
               "type":"string",
               "pattern":"^([a-z][a-z-]*[a-z]+|ec2-api)$",
               "description": "The unique identifier for the service to be used in the service catalog"
            },
            "project": {
               "type":"string",
               "pattern":"^([a-z][a-z-]*[a-z]+|ec2-api)$",
               "description": "The OpenStack project name that contains the definition of the API"
            },
            "api_reference": {
               "type":"string",
               "format": "url",
               "description": "A published API reference document for the API identified by this service type."
            },
            "api_reference_project": {
               "type":"string",
               "description": "Project where API reference is found, if not the same as the main project"
            },
            "description": {
               "type":"string",
               "description": "A short description about the service in question."
            },
            "aliases": {
               "type": "array",
               "items": {
                 "type": "string"
               },
               "description": "An ordered list of historical aliases for this service type."
            },
            "secondary": {
                "type": "boolean",
                "description": "Is this a secondary service for a project?"
            },
            "retired": {
                "type": "boolean",
                "description": "Is the API retired/obsolete?"
            }
         },
         "additionalProperties":false,
         "required":[
            "api_reference",
            "project",
            "service_type"
         ]
      }
   }
}
