Files
itroi/shared/src/main/resources/json-schema/vehicle-schema.json
T
2025-12-17 12:37:39 +02:00

60 lines
1.2 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://nure.ua/itroi/vehicle-schema.json",
"title": "Vehicles management schema",
"description": "Describes domain objects of vehicles",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"minimum": 1,
"maximum": 4294967295
},
"brand": {
"type": "string",
"minLength": 2,
"maxLength": 64
},
"model": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"license_plate": {
"type": "string",
"pattern": "^[A-Z]{2}[0-9]{4}[A-Z]{2}$",
"minLength": 8,
"maxLength": 8
},
"year": {
"type": "integer",
"minimum": 1980
},
"capacity_kg": {
"type": "number",
"minimum": 100,
"exclusiveMaximum": 4294967296
},
"status": {
"type": "string",
"enum": [
"AVAILABLE",
"IN_TRANSIT",
"MAINTENANCE"
]
}
},
"required": [
"id",
"brand",
"model",
"license_plate",
"year",
"capacity_kg",
"status"
]
}
}