{
  "$id": "https://schemas.opendd.eu/xtdlanguage.1.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "xtd Language Schema",
  "description": "According to SS-EN ISO 12006-3:2022",
  "type": "object",
  "allOf": [
    {
      "$ref": "/xtdroot.1.schema.json"
    },
    {
      "$ref": "#/$defs/Language"
    }
  ],
  "$defs": {
    "Language": {
      "type": "object",
      "properties": {
        "EnglishName": {
          "type": "string",
          "description": "Name of the language in which the identifying descriptive attribute is expressed in the form in which the language is known in English."
        },
        "NativeName": {
          "type": "string",
          "description": "Name of the language in which the identifying descriptive attribute is expressed in the form in which the language is known."
        },
        "Comments": {
          "type": "array",
          "description": "Optional list of comments for the language used.",
          "items": {
            "type": "string"
          },
          "minItems": 1
        },
        "Code": {
          "type": "string",
          "description": "The language shall consist of a code as defined by BCP 47 from IETF."
        }
      },
      "required": [
        "EnglishName",
        "Code"
      ]
    }
  }
}
