{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/canonicai-com/json-schema/canonicai-com-answer-schema.json",
  "title": "Answer",
  "description": "Answer contract v0",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/canonicai-com-openapi.json#/components/schemas/Answer",
  "type": "object",
  "required": [
    "id",
    "slug",
    "home",
    "question",
    "answer",
    "citations",
    "status"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "slug": {
      "type": "string"
    },
    "home": {
      "type": "string",
      "const": "canonicai"
    },
    "question": {
      "type": "string"
    },
    "shortAnswer": {
      "type": "string"
    },
    "answer": {
      "type": "string"
    },
    "canonicalUrl": {
      "type": "string",
      "format": "uri"
    },
    "citations": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "properties": {
          "libraryId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "locator": {
            "type": "string"
          },
          "claim": {
            "type": "string"
          }
        }
      }
    },
    "sourcePackets": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "status": {
      "type": "string",
      "enum": [
        "published"
      ]
    },
    "generatedBy": {
      "type": "object"
    }
  }
}