{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/stat-gov-pl/json-schema/stat-gov-pl-jednostki-terytorialne-page-schema.json",
  "title": "jednostki-terytorialne-page",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/stat-gov-pl-smup-openapi.yml#/components/schemas/jednostki-terytorialne-page",
  "type": "object",
  "properties": {
    "page-number": {
      "type": [
        "integer",
        "null"
      ],
      "description": "page_Number",
      "format": "int32"
    },
    "page-size": {
      "type": [
        "integer",
        "null"
      ],
      "description": "page_Size",
      "format": "int32"
    },
    "page-count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "page_Count",
      "format": "int32"
    },
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/jednostka-terytorialna"
      }
    }
  },
  "additionalProperties": false,
  "$defs": {
    "jednostka-terytorialna": {
      "type": "object",
      "properties": {
        "id-teryt": {
          "type": "integer",
          "format": "int32"
        },
        "kts-symbol": {
          "maxLength": 14,
          "type": [
            "string",
            "null"
          ]
        },
        "kraj": {
          "maxLength": 2,
          "type": [
            "string",
            "null"
          ]
        },
        "makreg": {
          "maxLength": 2,
          "type": [
            "string",
            "null"
          ]
        },
        "woj": {
          "maxLength": 2,
          "type": [
            "string",
            "null"
          ]
        },
        "reg": {
          "maxLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "podreg": {
          "maxLength": 2,
          "type": [
            "string",
            "null"
          ]
        },
        "pow": {
          "maxLength": 2,
          "type": [
            "string",
            "null"
          ]
        },
        "gmn": {
          "maxLength": 2,
          "type": [
            "string",
            "null"
          ]
        },
        "rodz": {
          "maxLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "mpozn-kod": {
          "maxLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "nazwa": {
          "maxLength": 150,
          "type": [
            "string",
            "null"
          ]
        },
        "nazwa-dod": {
          "maxLength": 150,
          "type": [
            "string",
            "null"
          ]
        },
        "data-od": {
          "type": "string",
          "format": "date-time"
        },
        "data-do": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": false
    }
  }
}