{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/stat-gov-pl/json-schema/stat-gov-pl-subject-details-schema.json",
  "title": "SubjectDetails",
  "description": "Szczegółowa reprezentacja tematu / Detailed representation of the subject",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/stat-gov-pl-bdl-openapi.yml#/components/schemas/SubjectDetails",
  "type": "object",
  "properties": {
    "metadata": {
      "$ref": "#/$defs/Metadata"
    },
    "version": {
      "$ref": "#/$defs/Version"
    },
    "id": {
      "type": [
        "string",
        "null"
      ],
      "description": "Identyfikator tematu / Subject identifier"
    },
    "parentId": {
      "type": [
        "string",
        "null"
      ],
      "description": "Identyfikator tematu nadrzędnego / Parent subject identifier"
    },
    "name": {
      "type": [
        "string",
        "null"
      ],
      "description": "Nazwa tematu / Subject name"
    },
    "hasVariables": {
      "type": "boolean",
      "description": "Czy temat posiada zmienne / Does the subject has variables"
    },
    "children": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      },
      "description": "Identyfikatory tematów podrzędnych / Children subject identifiers"
    },
    "levels": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "integer",
        "format": "int32"
      },
      "description": "Poziomy agregacji tematu / Subject agregate levels"
    },
    "years": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "integer",
        "format": "int32"
      },
      "description": "Lata obowiązywania tematu / Years of subject validity"
    },
    "availability": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/Available"
      },
      "description": "Opis dostępności w latach / Description of availability in years"
    },
    "dimensions": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      },
      "description": "Wymiary tematu / Subject dimensions"
    },
    "lastUpdate": {
      "type": [
        "string",
        "null"
      ],
      "description": "Data ostatniej aktualizacji tematu / Date of the last update of the subject",
      "format": "date-time"
    },
    "description": {
      "type": [
        "string",
        "null"
      ],
      "description": "Opis tematu / Subject description"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "Available": {
      "type": "object",
      "properties": {
        "year": {
          "type": [
            "string",
            "null"
          ],
          "description": "Rok / Year"
        },
        "levels": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "integer",
            "format": "int32"
          },
          "description": "Poziomy dostępności / Availability levels"
        },
        "quarterly": {
          "type": [
            "string",
            "null"
          ],
          "description": "Dane roczne czy kwartalne / Yearly or quarterly data"
        }
      },
      "additionalProperties": false,
      "description": "Opis dostępności w roku / Availability in year description"
    },
    "Metadata": {
      "type": "object",
      "properties": {
        "id": {
          "type": [
            "string",
            "null"
          ],
          "description": "Id metadanych / Matadata's id"
        },
        "title": {
          "type": [
            "string",
            "null"
          ],
          "description": "Nazwa zasobu / Resource name"
        },
        "url": {
          "type": [
            "string",
            "null"
          ],
          "description": "Url zasobu / Resource Url"
        },
        "provider": {
          "type": [
            "string",
            "null"
          ],
          "description": "Dostawca zasobu / Resource provider"
        },
        "modificationDate": {
          "type": "string",
          "description": "Data ostatniej modyfikacji / Last modification date",
          "format": "date-time"
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "Opis zasobu / Resource description"
        },
        "keywords": {
          "type": [
            "string",
            "null"
          ],
          "description": "Słowa kluczowe / Describing keywords"
        },
        "temporalCoverage": {
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "language": {
          "type": [
            "string",
            "null"
          ],
          "description": "Języki prezentowania zasobu / Resource's languages"
        },
        "updatePeriod": {
          "type": [
            "string",
            "null"
          ],
          "description": "Częstotliwość aktualizacji / Update frequency"
        },
        "contentType": {
          "type": [
            "string",
            "null"
          ],
          "description": "Typ treści / Content type"
        }
      },
      "additionalProperties": false,
      "description": "Definicja metadanych zasobu / Resource metadata definition"
    },
    "Version": {
      "type": "object",
      "properties": {
        "id": {
          "type": [
            "string",
            "null"
          ],
          "description": "Pełny numer wersji / Full version number"
        },
        "major": {
          "type": "integer",
          "description": "Numer główny wersji / The main version number",
          "format": "int32"
        },
        "minor": {
          "type": "integer",
          "description": "Numer dodatkowy wersji / The additional version number",
          "format": "int32"
        },
        "modificationDate": {
          "type": "string",
          "description": "Data ostatniej modyfikacji / Date of the last modification",
          "format": "date-time"
        },
        "deprecated": {
          "type": [
            "string",
            "null"
          ],
          "description": "Data wycofania / Date of the deprecation",
          "format": "date-time"
        }
      },
      "additionalProperties": false,
      "description": "Reprezentacja wersji API BDL / Representation of the API BDL version"
    }
  }
}