{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/canonicai-com/json-schema/canonicai-com-answer-search-response-schema.json",
  "title": "AnswerSearchResponse",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/canonicai-com-openapi.json#/components/schemas/AnswerSearchResponse",
  "type": "object",
  "required": [
    "query",
    "count",
    "matches"
  ],
  "properties": {
    "query": {
      "type": "string"
    },
    "count": {
      "type": "integer"
    },
    "matches": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AnswerSearchMatch"
      }
    }
  },
  "$defs": {
    "AnswerSearchMatch": {
      "allOf": [
        {
          "$ref": "#/$defs/AnswerSummary"
        },
        {
          "type": "object",
          "required": [
            "score"
          ],
          "properties": {
            "score": {
              "type": "integer"
            },
            "shortAnswer": {
              "type": "string"
            }
          }
        }
      ]
    },
    "AnswerSummary": {
      "type": "object",
      "required": [
        "slug",
        "id",
        "question",
        "url",
        "jsonUrl",
        "citationCount"
      ],
      "properties": {
        "slug": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "question": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "jsonUrl": {
          "type": "string",
          "format": "uri"
        },
        "citationCount": {
          "type": "integer"
        }
      }
    }
  }
}