{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/helena-bio/json-schema/helena-bio-public-variant-search-ambiguous-response-schema.json",
  "title": "PublicVariantSearchAmbiguousResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/helena-bio-public-variants-api-openapi.yml#/components/schemas/PublicVariantSearchAmbiguousResponse",
  "properties": {
    "search_contract_version": {
      "type": "string",
      "const": "1.0",
      "title": "Search Contract Version",
      "default": "1.0"
    },
    "status": {
      "type": "string",
      "const": "ambiguous",
      "title": "Status",
      "default": "ambiguous"
    },
    "resolution": {
      "$ref": "#/$defs/PublicVariantResolutionMetadata"
    },
    "error": {
      "$ref": "#/$defs/PublicVariantSearchError"
    },
    "total_candidate_count": {
      "type": "integer",
      "minimum": 2.0,
      "title": "Total Candidate Count"
    },
    "candidates_truncated": {
      "type": "boolean",
      "title": "Candidates Truncated"
    },
    "candidates": {
      "items": {
        "$ref": "#/$defs/PublicVariantSearchCandidate"
      },
      "type": "array",
      "maxItems": 10,
      "title": "Candidates"
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "resolution",
    "error",
    "total_candidate_count",
    "candidates_truncated",
    "candidates"
  ],
  "$defs": {
    "PublicVariantIdentity": {
      "properties": {
        "assembly": {
          "type": "string",
          "const": "GRCh38",
          "title": "Assembly"
        },
        "chromosome": {
          "type": "string",
          "minLength": 1,
          "title": "Chromosome"
        },
        "position": {
          "type": "integer",
          "minimum": 1.0,
          "title": "Position"
        },
        "reference": {
          "type": "string",
          "minLength": 1,
          "title": "Reference"
        },
        "alternate": {
          "type": "string",
          "minLength": 1,
          "title": "Alternate"
        },
        "variant_type": {
          "type": "string",
          "enum": [
            "SNV",
            "INS",
            "DEL",
            "DELINS"
          ],
          "title": "Variant Type"
        },
        "canonical_key": {
          "type": "string",
          "minLength": 1,
          "title": "Canonical Key"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "assembly",
        "chromosome",
        "position",
        "reference",
        "alternate",
        "variant_type",
        "canonical_key"
      ],
      "title": "PublicVariantIdentity"
    },
    "PublicVariantMappingSource": {
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "title": "Name"
        },
        "version": {
          "type": "string",
          "minLength": 1,
          "title": "Version"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "name",
        "version"
      ],
      "title": "PublicVariantMappingSource"
    },
    "PublicVariantResolutionMetadata": {
      "properties": {
        "normalized_query": {
          "type": "string",
          "maxLength": 512,
          "minLength": 1,
          "title": "Normalized Query"
        },
        "notation_family": {
          "type": "string",
          "enum": [
            "coordinate",
            "genomic_hgvs",
            "transcript_hgvs",
            "protein_hgvs",
            "spdi",
            "rsid",
            "identifier",
            "gene"
          ],
          "title": "Notation Family"
        },
        "input_accession": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Input Accession"
        },
        "input_version": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Input Version"
        },
        "resolver_schema_version": {
          "type": "string",
          "minLength": 1,
          "title": "Resolver Schema Version"
        },
        "resolver_asset_version": {
          "type": "string",
          "minLength": 1,
          "title": "Resolver Asset Version"
        },
        "mapping_sources": {
          "items": {
            "$ref": "#/$defs/PublicVariantMappingSource"
          },
          "type": "array",
          "title": "Mapping Sources"
        },
        "warnings": {
          "items": {
            "type": "string",
            "enum": [
              "case_normalized",
              "chromosome_prefix_normalized",
              "versionless_accession_unique",
              "indel_left_normalized",
              "redundant_padding_removed"
            ]
          },
          "type": "array",
          "title": "Warnings"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "normalized_query",
        "notation_family",
        "input_accession",
        "input_version",
        "resolver_schema_version",
        "resolver_asset_version",
        "mapping_sources",
        "warnings"
      ],
      "title": "PublicVariantResolutionMetadata"
    },
    "PublicVariantSearchCandidate": {
      "properties": {
        "identity": {
          "$ref": "#/$defs/PublicVariantIdentity"
        },
        "gene_symbol": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Gene Symbol"
        },
        "transcript_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Transcript Id"
        },
        "hgvs_genomic": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Hgvs Genomic"
        },
        "hgvs_cdna": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Hgvs Cdna"
        },
        "hgvs_protein": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Hgvs Protein"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "identity",
        "gene_symbol",
        "transcript_id",
        "hgvs_genomic",
        "hgvs_cdna",
        "hgvs_protein"
      ],
      "title": "PublicVariantSearchCandidate"
    },
    "PublicVariantSearchError": {
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "ambiguous_variant",
            "variant_not_found"
          ],
          "title": "Code"
        },
        "message": {
          "type": "string",
          "minLength": 1,
          "title": "Message"
        },
        "retryable": {
          "type": "boolean",
          "const": false,
          "title": "Retryable",
          "default": false
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "code",
        "message"
      ],
      "title": "PublicVariantSearchError"
    }
  }
}