{ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "Veicoli (vehicles.json)", "type": "object", "properties": { "$schema": { "type": "string" }, "version": { "type": "integer", "minimum": 1 }, "vehicles": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$" }, "kind": { "type": "string", "enum": [ "locomotive", "wagon", "coach" ] }, "name_it": { "type": "string", "minLength": 1 }, "name_en": { "type": "string", "minLength": 1 }, "eraFrom": { "type": "integer", "minimum": 1800, "maximum": 2300 }, "eraTo": { "type": "integer", "minimum": 1800, "maximum": 2300 }, "powerKw": { "type": "number", "minimum": 0 }, "tractiveEffortKn": { "type": "number", "minimum": 0 }, "maxSpeedKmh": { "type": "number", "minimum": 1, "maximum": 600 }, "massT": { "type": "number", "minimum": 0.1 }, "lengthM": { "type": "number", "minimum": 1, "maximum": 60 }, "price": { "type": "integer", "minimum": 0 }, "runningCostPerYear": { "type": "integer", "minimum": 0 }, "lifeYears": { "type": "integer", "minimum": 1, "maximum": 200 }, "traction": { "type": "string", "enum": [ "steam", "diesel", "electric", "highspeed" ] }, "components": { "type": "object", "additionalProperties": { "type": "number", "minimum": 0, "maximum": 5 } }, "capacity": { "type": "integer", "minimum": 1 }, "wagonType": { "type": "string", "enum": [ "hopper", "flat", "tank", "box" ] }, "goods": { "type": "array", "items": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$" }, "minItems": 1, "uniqueItems": true }, "paxCapacity": { "type": "integer", "minimum": 1 }, "class": { "type": "string", "enum": [ "worker", "staff" ] } }, "required": [ "id", "kind", "name_it", "name_en", "eraFrom", "maxSpeedKmh", "massT", "lengthM", "price", "runningCostPerYear", "lifeYears", "components" ], "additionalProperties": false }, "minItems": 8 } }, "required": [ "version", "vehicles" ], "additionalProperties": false }