{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/casatoo-pt/json-schema/casatoo-pt-public-search-response-schema.json",
  "title": "PublicSearchResponse",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/casatoo-pt-openapi.yml#/components/schemas/PublicSearchResponse",
  "properties": {
    "listings": {
      "items": {
        "$ref": "#/$defs/PublicListingOut"
      },
      "type": "array"
    },
    "location_id": {
      "format": "int32",
      "type": [
        "integer",
        "null"
      ]
    },
    "location_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "location_slug": {
      "type": [
        "string",
        "null"
      ]
    },
    "page": {
      "$ref": "#/$defs/SearchPage"
    }
  },
  "required": [
    "location_id",
    "location_name",
    "location_slug",
    "listings",
    "page"
  ],
  "type": "object",
  "$defs": {
    "PublicListingOut": {
      "properties": {
        "gross_area": {
          "format": "int64",
          "type": "integer"
        },
        "id": {
          "format": "uuid",
          "type": "string"
        },
        "image_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "n_rooms": {
          "format": "int64",
          "type": "integer"
        },
        "price": {
          "format": "double",
          "type": "number"
        },
        "property_type": {
          "type": "string"
        },
        "publish_date": {
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        },
        "source": {
          "type": "string"
        },
        "title": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "title",
        "price",
        "n_rooms",
        "gross_area",
        "property_type",
        "publish_date",
        "source",
        "image_url"
      ],
      "type": "object"
    },
    "SearchPage": {
      "properties": {
        "has_more": {
          "type": "boolean"
        },
        "limit": {
          "format": "int64",
          "type": "integer"
        },
        "next_cursor": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "limit",
        "next_cursor",
        "has_more"
      ],
      "type": "object"
    }
  }
}