{
    "id": "http://json-schema-extension.readthedocs.io/1__0__0/draft-04/metaschema.json",
    "$schema": "http://json-schema-extension.readthedocs.io/1__0__0/draft-04/metaschema.json",
    "properties": {
      "$ref": {
        "title": "URI Reference",
        "description": "A reference to a statically identified schema.  This keyword must be set to an absolute URI or a relative reference as defined by [RFC 3986](https://www.rfc-editor.org/info/rfc3986), where its fragment (if any) can consist of a JSON Pointer as defined by [RFC 6901](https://datatracker.ietf.org/doc/html/rfc6901).",
        "type": "string"
      },      
      "deprecatedDetails": {
        "$ref": "#/definitions/deprecatedDetails"
      },
      "codelist": {
        "title": "Codelist",
        "description": "The CSV file that defines the codes in the codelist that the field refers to.",
        "type": "string"
      },
      "openCodelist": {
        "title": "Open codelist",
        "description": "Whether the codelist that the field refers to is an open codelist.",
        "type": "boolean",
        "default": false,
        "deprecatedDetails": {
          "deprecatedVersion": "1.0",
          "description": "This keyword is deprecated favour of using `enum` to indicate a closed codelist. A field refers to an open codelist when `codelist` is set without the presence of `enum`."
        }
      },
      "deprecated": {
        "$ref": "#/definitions/deprecatedDetails",
        "deprecatedDetails": {
          "deprecatedVersion": "1.0",
          "description": "This field is deprecated in favour of `deprecatedDetails` for forward compatibility with later versions of JSON Schema, which implement a boolean `deprecated` keyword."
        }
      }
    },
    "definitions": {
      "deprecatedDetails": {
        "title": "Deprecated details",
        "description": "Information about the deprecation of the field.",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "deprecatedVersion",
          "description"
        ],
        "properties": {
          "deprecatedVersion": {
            "title": "Version",
            "description": "The version in which the field was first deprecated.",
            "type": "string"
          },
          "description": {
            "title": "Description",
            "description": "A description of the reason for the field's deprecation and information about its replacement, if any.",
            "type": "string"
          }
        }
      }
    },
    "additionalProperties": false
  }