{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/loupe-legal/json-schema/loupe-legal-cite-answer-schema.json",
  "title": "CiteAnswer",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/loupe-legal-openapi.yml#/components/schemas/CiteAnswer",
  "type": "object",
  "properties": {
    "asked": {
      "type": "string"
    },
    "citations": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Checked"
      }
    },
    "not_checked": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Checks that did not run, and why."
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "caveat": {
      "type": "string"
    }
  },
  "$defs": {
    "Checked": {
      "type": "object",
      "properties": {
        "citation": {
          "type": "string"
        },
        "kind": {
          "type": "string",
          "description": "case, statute, regulation, court_rule, constitution and the like."
        },
        "verdict": {
          "type": "string",
          "enum": [
            "verified",
            "mismatch",
            "not_found",
            "suspect",
            "unverifiable",
            "unverified"
          ]
        },
        "in_words": {
          "type": "string"
        },
        "case": {
          "type": [
            "string",
            "null"
          ]
        },
        "court": {
          "type": [
            "string",
            "null"
          ]
        },
        "decided": {
          "type": [
            "string",
            "null"
          ]
        },
        "pin": {
          "type": [
            "string",
            "null"
          ]
        },
        "findings": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "confidence": {
                "type": "string",
                "enum": [
                  "certain",
                  "probable",
                  "check",
                  "unverifiable"
                ]
              },
              "problem": {
                "type": "string"
              },
              "do": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        },
        "read_it": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "label": {
                "type": "string"
              },
              "url": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        }
      }
    }
  }
}