88 lines
3.5 KiB
JSON
88 lines
3.5 KiB
JSON
|
|
{
|
||
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||
|
|
"$id": "https://basicstack.de/schemas/ds/per_diem/v1.0.0.json",
|
||
|
|
"title": "DataSource Response: ds:per-diem-rates /rates v1.0.0",
|
||
|
|
"description": "Rückgabe-Schema für den Lesezugriff auf versionierte Verpflegungsmehraufwands-Pauschalen (z.B. BMF-Sätze für Deutschland, analog für andere Länder). Query-Filter kombinieren country (Pflicht), optional city und valid_on (Pflicht); Rückgabe listet alle am Stichtag gültigen passenden Rates (meistens eine, bei großen Städten mit abweichenden Sätzen gelegentlich mehrere).",
|
||
|
|
"type": "object",
|
||
|
|
"additionalProperties": false,
|
||
|
|
"required": ["schema", "data_source", "resource", "filters", "rates", "returned_at"],
|
||
|
|
"properties": {
|
||
|
|
"schema": {
|
||
|
|
"type": "object",
|
||
|
|
"additionalProperties": false,
|
||
|
|
"required": ["name", "version"],
|
||
|
|
"properties": {
|
||
|
|
"name": { "const": "ds.per_diem.rate" },
|
||
|
|
"version": { "const": "1.0.0" }
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"data_source": { "const": "ds:per-diem-rates" },
|
||
|
|
"resource": { "const": "rates" },
|
||
|
|
"filters": {
|
||
|
|
"type": "object",
|
||
|
|
"additionalProperties": false,
|
||
|
|
"required": ["country", "valid_on"],
|
||
|
|
"properties": {
|
||
|
|
"country": { "type": "string", "pattern": "^[A-Z]{2}$", "description": "ISO 3166-1 alpha-2." },
|
||
|
|
"city": { "type": "string", "minLength": 1, "maxLength": 100 },
|
||
|
|
"valid_on": { "type": "string", "format": "date" }
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"returned_at": { "type": "string", "format": "date-time" },
|
||
|
|
"rates": {
|
||
|
|
"type": "array",
|
||
|
|
"minItems": 1,
|
||
|
|
"maxItems": 50,
|
||
|
|
"items": {
|
||
|
|
"type": "object",
|
||
|
|
"additionalProperties": false,
|
||
|
|
"required": [
|
||
|
|
"rate_id",
|
||
|
|
"country",
|
||
|
|
"currency",
|
||
|
|
"full_day",
|
||
|
|
"partial_day_min8h",
|
||
|
|
"arrival_day",
|
||
|
|
"departure_day",
|
||
|
|
"valid_from",
|
||
|
|
"source_regulation"
|
||
|
|
],
|
||
|
|
"properties": {
|
||
|
|
"rate_id": { "type": "string", "pattern": "^PDR-[0-9]+$" },
|
||
|
|
"country": { "type": "string", "pattern": "^[A-Z]{2}$" },
|
||
|
|
"city": { "type": ["string", "null"], "maxLength": 100 },
|
||
|
|
"currency": { "type": "string", "pattern": "^[A-Z]{3}$" },
|
||
|
|
"full_day": {
|
||
|
|
"type": "string",
|
||
|
|
"pattern": "^[0-9]+\\.[0-9]{2}$",
|
||
|
|
"description": "Pauschale für vollen Reisetag (24h Abwesenheit)."
|
||
|
|
},
|
||
|
|
"partial_day_min8h": {
|
||
|
|
"type": "string",
|
||
|
|
"pattern": "^[0-9]+\\.[0-9]{2}$",
|
||
|
|
"description": "Pauschale bei >8h bis <24h Abwesenheit (sofern anwendbar)."
|
||
|
|
},
|
||
|
|
"arrival_day": {
|
||
|
|
"type": "string",
|
||
|
|
"pattern": "^[0-9]+\\.[0-9]{2}$",
|
||
|
|
"description": "Pauschale Anreisetag (unabhängig von der Abwesenheitsdauer)."
|
||
|
|
},
|
||
|
|
"departure_day": {
|
||
|
|
"type": "string",
|
||
|
|
"pattern": "^[0-9]+\\.[0-9]{2}$",
|
||
|
|
"description": "Pauschale Abreisetag (unabhängig von der Abwesenheitsdauer)."
|
||
|
|
},
|
||
|
|
"valid_from": { "type": "string", "format": "date" },
|
||
|
|
"valid_to": { "type": ["string", "null"], "format": "date" },
|
||
|
|
"source_regulation": {
|
||
|
|
"type": "string",
|
||
|
|
"minLength": 1,
|
||
|
|
"maxLength": 500,
|
||
|
|
"description": "Freitext-Zitierung der Rechtsquelle, z.B. 'BMF-Schreiben 2026-11-15 Az. IV C 5 - S 2353/19/10011 :005'."
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|