{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://istointents.org/schemas/0.1/criteria-property.schema.json",
  "title": "Property criteria and item fields",
  "description": "additionalProperties is false on purpose: protected characteristics (spec §8.2) cannot be expressed.",
  "type": "object",
  "properties": {
    "transaction": { "enum": ["sale", "rent"] },
    "propertyType": { "type": "array", "items": { "enum": ["flat", "house", "land", "commercial", "garage", "other"] } },
    "roomsMin": { "type": "number", "minimum": 0 },
    "rooms": { "type": "number", "minimum": 0 },
    "areaMinM2": { "type": "number", "minimum": 0 },
    "areaMaxM2": { "type": "number", "minimum": 0 },
    "areaM2": { "type": "number", "minimum": 0 },
    "landMinM2": { "type": "number", "minimum": 0 },
    "floorMin": { "type": "integer" },
    "floorMax": { "type": "integer" },
    "builtMin": { "type": "integer", "minimum": 1000 },
    "condition": { "type": "array", "items": { "enum": ["new-build", "renovated", "original", "to-renovate"] } },
    "features": { "type": "array", "items": { "enum": ["balcony", "terrace", "garden", "lift", "parking", "garage", "cellar", "furnished", "accessible"] } },
    "energyClassMax": { "enum": ["A0", "A1", "A", "B", "C", "D", "E", "F", "G"] },
    "address": { "type": "string" }
  },
  "additionalProperties": false
}
