{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/asoskill-com/json-schema/asoskill-com-search-response-schema.json",
  "title": "SearchResponse",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/asoskill-com-openapi.yaml#/components/schemas/SearchResponse",
  "type": "object",
  "required": [
    "term",
    "storefront",
    "platform",
    "difficulty",
    "resultCount",
    "results",
    "cache",
    "fetchedAt",
    "requestId"
  ],
  "properties": {
    "term": {
      "type": "string"
    },
    "storefront": {
      "type": "string"
    },
    "platform": {
      "$ref": "#/$defs/Platform"
    },
    "difficulty": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100
    },
    "resultCount": {
      "type": "integer",
      "minimum": 0
    },
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/SearchResult"
      }
    },
    "cache": {
      "$ref": "#/$defs/CacheStatus"
    },
    "fetchedAt": {
      "type": "string",
      "format": "date-time"
    },
    "requestId": {
      "type": "string"
    }
  },
  "$defs": {
    "CacheStatus": {
      "type": "string",
      "enum": [
        "hit",
        "refresh",
        "stale"
      ]
    },
    "Platform": {
      "type": "string",
      "enum": [
        "iphone",
        "ipad",
        "mac",
        "appletv",
        "watch",
        "vision"
      ],
      "default": "iphone"
    },
    "SearchResult": {
      "type": "object",
      "required": [
        "position",
        "appId",
        "name"
      ],
      "properties": {
        "position": {
          "type": "integer",
          "minimum": 1
        },
        "appId": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "subtitle": {
          "type": "string"
        },
        "developer": {
          "type": "string"
        },
        "rating": {
          "type": "number"
        },
        "ratingCount": {
          "type": "integer",
          "minimum": 0
        },
        "categoryRank": {
          "type": "integer",
          "minimum": 1
        },
        "category": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "icon": {
          "type": "string",
          "format": "uri"
        }
      }
    }
  }
}