{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://example.com/schemas/definition-ref.schema.json",
  "title": "API Definition Locations",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "definition"
  ],
  "properties": {
    "definition": {
      "type": "object",
      "description": "Media-type keyed locations of the API definition.",
      "additionalProperties": false,
      "properties": {
        "application/json": {
          "type": "string",
          "format": "uri",
          "description": "Absolute URI to the OpenAPI definition in JSON form."
        },
        "application/yaml": {
          "type": "string",
          "format": "uri",
          "description": "Absolute URI to the OpenAPI definition in YAML form."
        }
      },
      "anyOf": [
        {
          "required": [
            "application/json"
          ]
        },
        {
          "required": [
            "application/yaml"
          ]
        }
      ]
    }
  },
  "examples": [
    {
      "definition": {
        "application/json": "https://myapiserver.com/oaslocation"
      }
    },
    {
      "definition": {
        "application/yaml": "https://myapiserver.com/oaslocation"
      }
    },
    {
      "definition": {
        "application/json": "https://myapiserver.com/oaslocation",
        "application/yaml": "https://myapiserver.com/oaslocation"
      }
    }
  ]
}