schema-3166-2.json 1.02 KB
Newer Older
Tobias Quathamer's avatar
Tobias Quathamer committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14
{
  "$schema": "http://json-schema.org/draft-04/schema#",

  "title": "ISO 3166-2",
  "description": "ISO 3166-2 country and subdivision codes",
  "type": "object",

  "properties": {
    "3166-2": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "code": {
15
            "description": "Code of the country subset item",
Tobias Quathamer's avatar
Tobias Quathamer committed
16
            "type": "string",
17
            "pattern": "^[A-Z]{2}-[A-Z0-9]+$"
Tobias Quathamer's avatar
Tobias Quathamer committed
18
          },
19 20 21 22 23 24 25 26 27 28 29 30 31
          "name": {
            "description": "Name of the country subset item",
            "type": "string",
            "minLength": 1
          },
          "parent": {
            "description": "Parent of the country subset item (optional)",
            "type": "string",
            "minLength": 1
          },
          "type": {
            "description": "Type of subset of the country",
            "type": "string"
32
          }
33 34 35 36
        }
      },
      "required": ["code", "name", "type"],
      "additionalProperties": false
Tobias Quathamer's avatar
Tobias Quathamer committed
37 38 39 40
    }
  },
  "additionalProperties": false
}