Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016679RwmHsuTFfxt26wP6rk
507 lines
10 KiB
JSON
507 lines
10 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-publicetie-tiesibu-akti-0.1.schema.json",
|
|
"title": "TAP publicētie tiesību akti",
|
|
"description": "Tiesību aktu portālā (TAP) pieņemtie un izskatītie tiesību aktu projekti: viena JSON:API datne par katru mēnesi, kā publicēta data.gov.lv (legal_acts_GGGG-MM-01-GGGG-MM-DD.json). Saistītie ieraksti (included): dokumentu versijas, papildu dokumenti, politikas jomas, tiesību aktu veidi.",
|
|
"type": "object",
|
|
"required": [
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/$defs/LegalAct"
|
|
}
|
|
},
|
|
"meta": {
|
|
"type": "object"
|
|
},
|
|
"included": {
|
|
"type": "array",
|
|
"items": {
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/$defs/DocumentVersion"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/AdditionalDocument"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/PolicyArea"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/LegalActType"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"$defs": {
|
|
"LegalAct": {
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"type",
|
|
"attributes",
|
|
"relationships",
|
|
"links"
|
|
],
|
|
"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_acts"
|
|
},
|
|
"attributes": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"identificator",
|
|
"name",
|
|
"responsible_institution_name",
|
|
"progress_name",
|
|
"reviewer_institutions",
|
|
"submitted_at",
|
|
"due_at"
|
|
],
|
|
"properties": {
|
|
"identificator": {
|
|
"type": "string",
|
|
"pattern": "^([0-9]{2}|[0-9]{4})-TA-[0-9A-Za-z]+$",
|
|
"description": "TAP projekta identifikators: GG-TA-… (piem. 26-TA-2145); 2021. gada projektiem gads četriem cipariem (2021-TA-763)"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"responsible_institution_name": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"progress_name": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"description": "Projekta virzības stadija (piem. Pieņemts, Iesniegts)"
|
|
},
|
|
"reviewer_institutions": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"code",
|
|
"name"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"code": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"submitted_at": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string",
|
|
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]+)?([+-][0-9]{2}:[0-9]{2}|Z)$"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"due_at": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string",
|
|
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]+)?([+-][0-9]{2}:[0-9]{2}|Z)$"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"relationships": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"legal_act_type",
|
|
"policy_areas"
|
|
],
|
|
"properties": {
|
|
"legal_act_type": {
|
|
"type": "object",
|
|
"required": [
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"type",
|
|
"id"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"type": {
|
|
"const": "legal_act_types"
|
|
},
|
|
"id": {
|
|
"type": "string",
|
|
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"policy_areas": {
|
|
"type": "object",
|
|
"required": [
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"type",
|
|
"id"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"type": {
|
|
"const": "policy_areas"
|
|
},
|
|
"id": {
|
|
"type": "string",
|
|
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"document_versions": {
|
|
"type": "object",
|
|
"required": [
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"type",
|
|
"id"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"type": {
|
|
"const": "legal_act_document_versions"
|
|
},
|
|
"id": {
|
|
"type": "string",
|
|
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"additional_documents": {
|
|
"type": "object",
|
|
"required": [
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"type",
|
|
"id"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"type": {
|
|
"const": "legal_act_additional_documents"
|
|
},
|
|
"id": {
|
|
"type": "string",
|
|
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"links": {
|
|
"type": "object",
|
|
"required": [
|
|
"web"
|
|
],
|
|
"properties": {
|
|
"web": {
|
|
"type": "string",
|
|
"pattern": "^https://tapportals\\.mk\\.gov\\.lv/legal_acts/"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"DocumentVersion": {
|
|
"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_document_versions"
|
|
},
|
|
"attributes": {
|
|
"type": "object",
|
|
"required": [
|
|
"name",
|
|
"items"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"url"
|
|
],
|
|
"properties": {
|
|
"url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"links": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"AdditionalDocument": {
|
|
"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_additional_documents"
|
|
},
|
|
"attributes": {
|
|
"type": "object",
|
|
"required": [
|
|
"name",
|
|
"upload_file_name"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"upload_file_name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"links": {
|
|
"type": "object",
|
|
"properties": {
|
|
"file": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"PolicyArea": {
|
|
"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": "policy_areas"
|
|
},
|
|
"attributes": {
|
|
"type": "object",
|
|
"required": [
|
|
"name",
|
|
"active_from",
|
|
"active_to"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"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"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"relationships": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"parent_value": {
|
|
"type": "object",
|
|
"required": [
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"anyOf": [
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type",
|
|
"id"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"type": {
|
|
"const": "policy_areas"
|
|
},
|
|
"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": "null"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"links": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"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
|
|
} |