1
0
Files

81 lines
1.7 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://processgit.org/Valsts-Pirmkods/MK-Lemumi-as-Code/raw/branch/main/schemas/tap-tiesibu-aktu-veidi-0.1.schema.json",
"title": "TAP tiesību aktu veidi",
"description": "Tiesību aktu portāla (TAP) tiesību aktu veidu klasifikācija, kā publicēta data.gov.lv (JSON:API datne legal_act_types.json).",
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/$defs/LegalActType"
}
},
"meta": {
"type": "object"
}
},
"$defs": {
"LegalActType": {
"type": "object",
"required": [
"id",
"type",
"attributes"
],
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
},
"type": {
"const": "legal_act_types"
},
"attributes": {
"type": "object",
"required": [
"code",
"name",
"active_from",
"active_to"
],
"additionalProperties": false,
"properties": {
"code": {
"type": "string",
"pattern": "^TA-[A-Za-z0-9-]+$",
"description": "Tiesību akta veida kods TAP (piem. TA-Rik)"
},
"name": {
"type": "string",
"minLength": 1
},
"active_from": {
"type": "string",
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
},
"active_to": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
},
{
"type": "null"
}
]
}
}
},
"links": {
"type": "object"
}
}
}
},
"additionalProperties": false
}