{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/astranexo-com/json-schema/astranexo-com-address-search-result-schema.json",
  "title": "AddressSearchResult",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/astranexo-com-cat-logos-api-openapi.yml#/components/schemas/AddressSearchResult",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "neighborhood",
        "district",
        "canton",
        "province"
      ]
    },
    "id": {
      "type": "integer",
      "format": "int64"
    },
    "primary_text": {
      "type": "string"
    },
    "secondary_text": {
      "type": "string"
    },
    "province": {
      "$ref": "#/$defs/Province"
    },
    "canton": {
      "oneOf": [
        {
          "$ref": "#/$defs/LocationUnit"
        },
        {
          "type": "null"
        }
      ]
    },
    "district": {
      "oneOf": [
        {
          "$ref": "#/$defs/LocationUnit"
        },
        {
          "type": "null"
        }
      ]
    },
    "neighborhood": {
      "oneOf": [
        {
          "$ref": "#/$defs/LocationUnit"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "$defs": {
    "LocationUnit": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "code": {
          "type": "string"
        },
        "full_code": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "Province": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "code": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      }
    }
  }
}