{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/casatoo-pt/json-schema/casatoo-pt-search-in-schema.json",
  "title": "SearchIn",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/casatoo-pt-openapi.yml#/components/schemas/SearchIn",
  "properties": {
    "geometry": {
      "anyOf": [
        {
          "properties": {
            "coordinates": {
              "$ref": "#/$defs/Coordinates"
            },
            "type": {
              "$ref": "#/$defs/GeometryType"
            }
          },
          "required": [
            "type",
            "coordinates"
          ],
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "gross_area_max": {
      "$ref": "#/$defs/IntMaximum"
    },
    "gross_area_min": {
      "format": "int64",
      "type": "integer"
    },
    "location_ids": {
      "items": {
        "format": "int64",
        "type": "integer"
      },
      "type": "array"
    },
    "name": {
      "type": "string"
    },
    "plot_area_max": {
      "$ref": "#/$defs/FloatMaximum"
    },
    "plot_area_min": {
      "format": "double",
      "type": "number"
    },
    "plot_zoning_categories": {
      "default": [],
      "items": {
        "$ref": "#/$defs/PlotZoningCategory"
      },
      "type": "array"
    },
    "price_max": {
      "$ref": "#/$defs/FloatMaximum"
    },
    "price_min": {
      "format": "double",
      "type": "number"
    },
    "property_categories": {
      "items": {
        "$ref": "#/$defs/PropertyCategory"
      },
      "type": "array"
    },
    "rooms": {
      "items": {
        "$ref": "#/$defs/Room"
      },
      "type": "array"
    }
  },
  "required": [
    "name",
    "location_ids",
    "price_min",
    "price_max",
    "gross_area_min",
    "gross_area_max",
    "plot_area_min",
    "plot_area_max",
    "rooms",
    "property_categories"
  ],
  "type": "object",
  "$defs": {
    "Coordinates": {
      "anyOf": [
        {
          "items": {
            "items": {
              "items": {
                "anyOf": [
                  {
                    "format": "double",
                    "type": "number"
                  },
                  {
                    "format": "int64",
                    "type": "integer"
                  }
                ]
              },
              "type": "array"
            },
            "type": "array"
          },
          "type": "array"
        },
        {
          "items": {
            "items": {
              "items": {
                "items": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "format": "int64",
                      "type": "integer"
                    }
                  ]
                },
                "type": "array"
              },
              "type": "array"
            },
            "type": "array"
          },
          "type": "array"
        }
      ]
    },
    "FloatMaximum": {
      "anyOf": [
        {
          "format": "double",
          "type": "number"
        }
      ]
    },
    "GeometryType": {
      "enum": [
        "Polygon",
        "MultiPolygon"
      ],
      "type": "string"
    },
    "IntMaximum": {
      "anyOf": [
        {
          "format": "int64",
          "type": "integer"
        }
      ]
    },
    "PlotZoningCategory": {
      "enum": [
        "urban",
        "urbanizable",
        "rustic"
      ],
      "type": "string"
    },
    "PropertyCategory": {
      "enum": [
        "apartment",
        "house",
        "plot"
      ],
      "type": "string"
    },
    "Room": {
      "enum": [
        "T0",
        "T1",
        "T2",
        "T3",
        "T4",
        "T5+"
      ],
      "type": "string"
    }
  }
}