{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/asoskill-com/json-schema/asoskill-com-autocomplete-response-schema.json",
  "title": "AutocompleteResponse",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/asoskill-com-openapi.yaml#/components/schemas/AutocompleteResponse",
  "type": "object",
  "required": [
    "term",
    "storefront",
    "platform",
    "resultCount",
    "suggestions",
    "cache",
    "fetchedAt",
    "requestId"
  ],
  "properties": {
    "term": {
      "type": "string"
    },
    "storefront": {
      "type": "string"
    },
    "platform": {
      "$ref": "#/$defs/Platform"
    },
    "resultCount": {
      "type": "integer",
      "minimum": 0,
      "maximum": 10
    },
    "suggestions": {
      "type": "array",
      "maxItems": 10,
      "items": {
        "$ref": "#/$defs/AutocompleteSuggestion"
      }
    },
    "cache": {
      "$ref": "#/$defs/CacheStatus"
    },
    "fetchedAt": {
      "type": "string",
      "format": "date-time"
    },
    "requestId": {
      "type": "string"
    }
  },
  "$defs": {
    "AutocompleteSuggestion": {
      "type": "object",
      "required": [
        "position",
        "term"
      ],
      "additionalProperties": false,
      "properties": {
        "position": {
          "type": "integer",
          "minimum": 1,
          "maximum": 10
        },
        "term": {
          "type": "string"
        }
      }
    },
    "CacheStatus": {
      "type": "string",
      "enum": [
        "hit",
        "refresh",
        "stale"
      ]
    },
    "Platform": {
      "type": "string",
      "enum": [
        "iphone",
        "ipad",
        "mac",
        "appletv",
        "watch",
        "vision"
      ],
      "default": "iphone"
    }
  }
}