{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ayushrai-site/json-schema/ayushrai-site-search-response-schema.json",
  "title": "SearchResponse",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ayushrai-site-openapi.json#/components/schemas/SearchResponse",
  "type": "object",
  "required": [
    "query",
    "match",
    "ranking",
    "results",
    "nextCursor"
  ],
  "properties": {
    "query": {
      "type": "string"
    },
    "match": {
      "type": "string",
      "const": "lexical"
    },
    "ranking": {
      "type": "string"
    },
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/SearchItem"
      }
    },
    "nextCursor": {
      "$ref": "#/$defs/NextCursor"
    }
  },
  "$defs": {
    "NextCursor": {
      "type": [
        "string",
        "null"
      ],
      "description": "Pass as cursor to fetch the next page. null means this is the last page. Treat it as opaque."
    },
    "SearchItem": {
      "type": "object",
      "required": [
        "id",
        "title",
        "type",
        "summary",
        "href",
        "tags"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "person",
            "work",
            "product",
            "project",
            "research",
            "experience",
            "education",
            "leadership",
            "recognition",
            "idea",
            "principle",
            "note",
            "writing",
            "elsewhere",
            "capability",
            "domain"
          ]
        },
        "summary": {
          "type": "string"
        },
        "href": {
          "type": "string",
          "description": "Site-relative path of the page"
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    }
  }
}