51 lines
2.1 KiB
JSON
51 lines
2.1 KiB
JSON
|
|
{
|
||
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||
|
|
"$id": "https://basicstack.de/schemas/ds/expense/project_assignment/v1.0.0.json",
|
||
|
|
"title": "DataSource Response: project_assignments (ds:expense-db-app) v1.0.0",
|
||
|
|
"description": "Rückgabe-Schema der Datenquelle ds:expense-db-app, Resource project_assignments. Der Datenquellen-Adapter signiert eine Query Attestation mit diesem Schema als result-Teil.",
|
||
|
|
"type": "object",
|
||
|
|
"additionalProperties": false,
|
||
|
|
"required": ["schema", "data_source", "resource", "filters", "rows", "returned_at"],
|
||
|
|
"properties": {
|
||
|
|
"schema": {
|
||
|
|
"type": "object",
|
||
|
|
"additionalProperties": false,
|
||
|
|
"required": ["name", "version"],
|
||
|
|
"properties": {
|
||
|
|
"name": { "const": "ds.expense.project_assignment" },
|
||
|
|
"version": { "const": "1.0.0" }
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"data_source": { "const": "ds:expense-db-app" },
|
||
|
|
"resource": { "const": "project_assignments" },
|
||
|
|
"filters": {
|
||
|
|
"type": "object",
|
||
|
|
"additionalProperties": false,
|
||
|
|
"required": ["employee_id"],
|
||
|
|
"properties": {
|
||
|
|
"employee_id": { "type": "string", "pattern": "^EMP-[0-9]+$" },
|
||
|
|
"active_on": { "type": "string", "format": "date" }
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"returned_at": { "type": "string", "format": "date-time" },
|
||
|
|
"rows": {
|
||
|
|
"type": "array",
|
||
|
|
"maxItems": 500,
|
||
|
|
"items": {
|
||
|
|
"type": "object",
|
||
|
|
"additionalProperties": false,
|
||
|
|
"required": ["project_code", "project_display_name", "employee_id", "valid_from"],
|
||
|
|
"properties": {
|
||
|
|
"project_code": { "type": "string", "pattern": "^P-[0-9]+$" },
|
||
|
|
"project_display_name": { "type": "string", "minLength": 1, "maxLength": 200 },
|
||
|
|
"employee_id": { "type": "string", "pattern": "^EMP-[0-9]+$" },
|
||
|
|
"role": { "type": "string", "maxLength": 100 },
|
||
|
|
"default_cost_center": { "type": "string", "pattern": "^CC-[0-9]+$" },
|
||
|
|
"valid_from": { "type": "string", "format": "date" },
|
||
|
|
"valid_to": { "type": ["string", "null"], "format": "date" }
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|