{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/atatravel-cloud/json-schema/atatravel-cloud-discovery-context-schema.json",
  "title": "DiscoveryContext",
  "description": "Live facets and guidance derived from ATA public inventory.",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/atatravel-cloud-openapi.json#/components/schemas/DiscoveryContext",
  "type": "object",
  "required": [
    "generatedAt",
    "totalProperties",
    "destinations",
    "propertyTypes",
    "buildingTypes",
    "capacity",
    "amenities",
    "views",
    "suitabilityTags",
    "bestFor",
    "notIdealFor"
  ],
  "properties": {
    "generatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "totalProperties": {
      "type": "integer",
      "minimum": 0
    },
    "destinations": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DiscoveryDestination"
      }
    },
    "propertyTypes": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CountedValue"
      }
    },
    "buildingTypes": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CountedValue"
      }
    },
    "capacity": {
      "oneOf": [
        {
          "$ref": "#/$defs/CapacityRange"
        },
        {
          "type": "null"
        }
      ]
    },
    "amenities": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CountedValue"
      }
    },
    "views": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CountedValue"
      }
    },
    "suitabilityTags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CountedValue"
      }
    },
    "bestFor": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CountedValue"
      }
    },
    "notIdealFor": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CountedValue"
      }
    }
  },
  "additionalProperties": false,
  "$defs": {
    "CapacityRange": {
      "type": "object",
      "required": [
        "minimum",
        "maximum"
      ],
      "properties": {
        "minimum": {
          "type": "integer",
          "minimum": 0
        },
        "maximum": {
          "type": "integer",
          "minimum": 0
        }
      },
      "additionalProperties": false
    },
    "CountedValue": {
      "type": "object",
      "required": [
        "value",
        "count"
      ],
      "properties": {
        "value": {
          "type": "string"
        },
        "count": {
          "type": "integer",
          "minimum": 1
        }
      },
      "additionalProperties": false
    },
    "DiscoveryDestination": {
      "type": "object",
      "required": [
        "label",
        "propertyCount"
      ],
      "properties": {
        "city": {
          "type": [
            "string",
            "null"
          ]
        },
        "state": {
          "type": [
            "string",
            "null"
          ]
        },
        "country": {
          "type": [
            "string",
            "null"
          ]
        },
        "label": {
          "type": "string"
        },
        "propertyCount": {
          "type": "integer",
          "minimum": 1
        }
      },
      "additionalProperties": false
    }
  }
}