{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/helena-bio/json-schema/helena-bio-gene-literature-response-schema.json",
  "title": "GeneLiteratureResponse",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/helena-bio-openapi.json#/components/schemas/GeneLiteratureResponse",
  "properties": {
    "schema_version": {
      "type": "string",
      "const": "1.0",
      "title": "Schema Version",
      "default": "1.0"
    },
    "gene_id": {
      "type": "string",
      "pattern": "^HGNC:[1-9][0-9]*$",
      "title": "Gene Id"
    },
    "canonical_symbol": {
      "type": "string",
      "maxLength": 200,
      "minLength": 1,
      "title": "Canonical Symbol"
    },
    "request_id": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{1,64}$",
      "title": "Request Id"
    },
    "snapshot_id": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$",
      "title": "Snapshot Id"
    },
    "owner": {
      "type": "string",
      "const": "canonical_literature_mining",
      "title": "Owner",
      "default": "canonical_literature_mining"
    },
    "query": {
      "type": "string",
      "maxLength": 2000,
      "minLength": 1,
      "title": "Query"
    },
    "captured_at": {
      "type": "string",
      "maxLength": 200,
      "minLength": 1,
      "title": "Captured At"
    },
    "capture_sha256": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$",
      "title": "Capture Sha256"
    },
    "owner_contract_version": {
      "type": "string",
      "const": "1.0",
      "title": "Owner Contract Version",
      "default": "1.0"
    },
    "owner_returned_count": {
      "type": "integer",
      "maximum": 25.0,
      "minimum": 0.0,
      "title": "Owner Returned Count"
    },
    "returned": {
      "type": "integer",
      "maximum": 25.0,
      "minimum": 0.0,
      "title": "Returned"
    },
    "filtered_unsafe_link_count": {
      "type": "integer",
      "maximum": 25.0,
      "minimum": 0.0,
      "title": "Filtered Unsafe Link Count"
    },
    "records": {
      "items": {
        "$ref": "#/$defs/DiscoveryRecord"
      },
      "type": "array",
      "maxItems": 25,
      "title": "Records"
    },
    "has_more": {
      "type": "boolean",
      "title": "Has More"
    },
    "next_cursor": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Next Cursor"
    },
    "semantic_index_used": {
      "type": "boolean",
      "title": "Semantic Index Used"
    },
    "semantic_degraded_reason": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000,
          "minLength": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Semantic Degraded Reason"
    },
    "graph_used": {
      "type": "boolean",
      "title": "Graph Used"
    },
    "graph_version": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 200,
          "minLength": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Graph Version"
    },
    "graph_degraded_reason": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000,
          "minLength": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Graph Degraded Reason"
    },
    "limits": {
      "items": {
        "type": "string",
        "maxLength": 2000,
        "minLength": 1
      },
      "type": "array",
      "title": "Limits"
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "gene_id",
    "canonical_symbol",
    "request_id",
    "snapshot_id",
    "query",
    "captured_at",
    "capture_sha256",
    "owner_returned_count",
    "returned",
    "filtered_unsafe_link_count",
    "records",
    "has_more",
    "next_cursor",
    "semantic_index_used",
    "semantic_degraded_reason",
    "graph_used",
    "graph_version",
    "graph_degraded_reason",
    "limits"
  ],
  "$defs": {
    "DiscoveryRecord": {
      "properties": {
        "work_id": {
          "type": "string",
          "maxLength": 200,
          "minLength": 1,
          "title": "Work Id"
        },
        "pmid": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[0-9]{1,12}$"
            },
            {
              "type": "null"
            }
          ],
          "title": "Pmid"
        },
        "title": {
          "type": "string",
          "maxLength": 2000,
          "minLength": 1,
          "title": "Title"
        },
        "journal": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 2000,
              "minLength": 1
            },
            {
              "type": "null"
            }
          ],
          "title": "Journal"
        },
        "publication_date": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 200,
              "minLength": 1
            },
            {
              "type": "null"
            }
          ],
          "title": "Publication Date"
        },
        "doi": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 200,
              "minLength": 1
            },
            {
              "type": "null"
            }
          ],
          "title": "Doi"
        },
        "source_url": {
          "type": "string",
          "maxLength": 2000,
          "title": "Source Url"
        },
        "match_types": {
          "items": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "type": "array",
          "maxItems": 30,
          "title": "Match Types"
        },
        "rank_score": {
          "type": "number",
          "title": "Rank Score"
        },
        "relation": {
          "type": "string",
          "const": "discovery_result_not_curated_gene_association",
          "title": "Relation",
          "default": "discovery_result_not_curated_gene_association"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "work_id",
        "pmid",
        "title",
        "journal",
        "publication_date",
        "doi",
        "source_url",
        "match_types",
        "rank_score"
      ],
      "title": "DiscoveryRecord"
    }
  }
}