swo/structure/schema.json
baiobelfer 39cad9e53c u
2025-04-05 09:21:02 +02:00

154 lines
4.3 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://example.com/wo.schema.json",
"title": "Wewnątrzszkolne Ocenianie Schema",
"description": "Schema walidująca dokument wo.json opisujący wewnątrzszkolne zasady oceniania.",
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "Tytuł główny dokumentu, np. 'WEWNĄTRZSZKOLNE OCENIANIE'."
},
"subtitle": {
"type": "string",
"description": "Podtytuł dokumentu lub dodatkowa informacja, np. 'Załącznik Nr 2...'."
},
"institution": {
"type": "string",
"description": "Nazwa instytucji (szkoły)."
},
"legal_basis": {
"type": "array",
"description": "Lista podstaw prawnych wraz z opisami.",
"items": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "Tytuł podstawy prawnej (np. nazwa ustawy lub rozporządzenia)."
},
"description": {
"type": "string",
"description": "Opis lub rozwinięcie podstawy prawnej."
}
},
"required": ["title"],
"additionalProperties": false
}
},
"authors": {
"type": "array",
"description": "Lista autorów dokumentu.",
"items": {
"type": "string"
}
},
"sections": {
"type": "array",
"description": "Tablica rozdziałów (sekcji) dokumentu.",
"items": {
"$ref": "#/definitions/section"
},
"minItems": 1
}
},
"required": ["title", "institution", "sections"],
"additionalProperties": false,
"definitions": {
"section": {
"type": "object",
"description": "Obiekt reprezentujący rozdział/sekcję w dokumencie.",
"properties": {
"nr": {
"type": "integer",
"description": "Numer rozdziału (kolejność)."
},
"title": {
"type": "string",
"description": "Tytuł rozdziału."
},
"description": {
"type": "string",
"description": "Krótka charakterystyka/typ rozdziału (np. 'rozdział')."
},
"details": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": { "type": "string" }
}
],
"description": "Treść opisowa (może być single string lub tablica stringów)."
},
"law": {
"type": "array",
"description": "Tablica podstaw prawnych odnoszących się do tego rozdziału.",
"items": {
"type": "string"
}
},
"items": {
"type": "array",
"description": "Podrzędne elementy (np. paragrafy).",
"items": {
"$ref": "#/definitions/item"
}
}
},
"required": ["nr", "title", "items"],
"additionalProperties": false
},
"item": {
"type": "object",
"description": "Obiekt reprezentujący paragraf/punkt/podpunkt w danym rozdziale.",
"properties": {
"nr": {
"type": "integer",
"description": "Numer elementu (np. nr paragrafu, punktu)."
},
"title": {
"type": "string",
"description": "Tytuł elementu (np. '§ 1. Zakres...')."
},
"description": {
"type": "string",
"description": "Krótki opis typu elementu (np. 'paragraf', 'punkt', 'letter')."
},
"details": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": { "type": "string" }
}
],
"description": "Treść opisowa (może być single string lub tablica stringów)."
},
"law": {
"type": "array",
"description": "Tablica podstaw prawnych odnoszących się do danego elementu.",
"items": {
"type": "string"
}
},
"items": {
"type": "array",
"description": "Lista kolejnych zagnieżdżonych elementów (punktów, podpunktów).",
"items": {
"$ref": "#/definitions/item"
}
}
},
"required": ["nr", "title", "items"],
"additionalProperties": false
}
}
}