{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/componecat-ai/json-schema/componecat-ai-global-search-response-resource-schema.json",
  "title": "GlobalSearchResponseResource",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/componecat-ai-global-search-api-openapi.yml#/components/schemas/GlobalSearchResponseResource",
  "required": [
    "results",
    "totalCount"
  ],
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/GlobalSearchResultResource"
      }
    },
    "totalCount": {
      "pattern": "^-?(?:0|[1-9]\\d*)$",
      "type": [
        "integer",
        "string"
      ],
      "format": "int32"
    }
  },
  "$defs": {
    "GlobalSearchResultDatumResource": {
      "required": [
        "key",
        "value"
      ],
      "type": "object",
      "properties": {
        "key": {
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      }
    },
    "GlobalSearchResultResource": {
      "required": [
        "kind",
        "id",
        "title",
        "group",
        "subtitle",
        "excerpt",
        "path",
        "score",
        "data"
      ],
      "type": "object",
      "properties": {
        "kind": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "group": {
          "type": [
            "null",
            "string"
          ]
        },
        "subtitle": {
          "type": [
            "null",
            "string"
          ]
        },
        "excerpt": {
          "type": [
            "null",
            "string"
          ]
        },
        "path": {
          "type": [
            "null",
            "string"
          ]
        },
        "score": {
          "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
          "type": [
            "number",
            "string"
          ],
          "format": "double"
        },
        "data": {
          "type": [
            "null",
            "array"
          ],
          "items": {
            "$ref": "#/$defs/GlobalSearchResultDatumResource"
          }
        }
      }
    }
  }
}