{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://istointents.org/schemas/0.1/criteria-vehicle.schema.json",
  "title": "Vehicle criteria and item fields",
  "type": "object",
  "properties": {
    "make": { "type": "string" },
    "model": { "type": "string" },
    "trim": { "type": "string" },
    "yearMin": { "type": "integer", "minimum": 1900 },
    "yearMax": { "type": "integer", "minimum": 1900 },
    "year": { "type": "integer", "minimum": 1900 },
    "mileageMaxKm": { "type": "integer", "minimum": 0 },
    "mileageKm": { "type": "integer", "minimum": 0 },
    "fuel": { "type": "array", "items": { "enum": ["petrol", "diesel", "hybrid", "plug-in-hybrid", "electric", "lpg", "cng", "hydrogen", "other"] } },
    "transmission": { "type": "array", "items": { "enum": ["manual", "automatic"] } },
    "body": { "type": "array", "items": { "enum": ["hatchback", "sedan", "estate", "suv", "coupe", "convertible", "mpv", "van", "pickup", "other"] } },
    "drivetrain": { "type": "array", "items": { "enum": ["fwd", "rwd", "awd"] } },
    "powerMinKw": { "type": "integer", "minimum": 0 },
    "powerMaxKw": { "type": "integer", "minimum": 0 },
    "powerKw": { "type": "integer", "minimum": 0 },
    "seatsMin": { "type": "integer", "minimum": 1 },
    "colour": { "type": "array", "items": { "type": "string" } },
    "condition": { "enum": ["new", "used", "certified-used"] },
    "vin": { "type": "string", "pattern": "^[A-HJ-NPR-Z0-9]{17}$" },
    "firstRegistration": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}$" }
  },
  "additionalProperties": false
}
