{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/system/main/json-schema/system-pubmed-search-synthesis-job-schema.json",
  "title": "PubmedSearchSynthesisJob",
  "description": "Pubmed search synthesis job.",
  "x-generated": "2026-10-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/system-api-openapi.json#/components/schemas/PubmedSearchSynthesisJob",
  "properties": {
    "id": {
      "type": "string",
      "title": "Id",
      "description": "Unique identifier of a Pubmed search synthesis job"
    },
    "status": {
      "allOf": [
        {
          "$ref": "#/$defs/JobStatus"
        }
      ],
      "description": "Status of job"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At",
      "description": "Date job was created"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "title": "Updated At",
      "description": "Date job was last updated"
    },
    "user_query": {
      "type": "string",
      "title": "User Query",
      "description": "Initial user query"
    },
    "pubmed_query": {
      "type": "string",
      "title": "Pubmed Query",
      "description": "Pubmed query used for synthesis"
    },
    "pubmed_query_translation": {
      "type": "string",
      "title": "Pubmed Query Translation",
      "description": "Translation of pubmed query from the pubmed api"
    },
    "num_pubmed_results": {
      "type": "integer",
      "title": "Num Pubmed Results",
      "description": "Number of results from pubmed query"
    },
    "clustering_finished": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Clustering Finished",
      "description": "Date clustering was finished"
    },
    "synthesis_finished": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Synthesis Finished",
      "description": "Date synthesis was finished"
    }
  },
  "type": "object",
  "required": [
    "id",
    "status",
    "created_at",
    "updated_at",
    "user_query",
    "pubmed_query"
  ],
  "$defs": {
    "JobStatus": {
      "type": "string",
      "enum": [
        "accepted",
        "clustering",
        "clustering_failed",
        "clustering_failed_no_clusters",
        "synthesizing",
        "synthesis_not_exists",
        "synthesis_submitted",
        "synthesis_running",
        "synthesis_success",
        "synthesis_failed",
        "synthesis_failed_no_citations",
        "synthesis_failed_validation"
      ],
      "title": "JobStatus",
      "description": "Status of a pubmed search synthesis job."
    }
  }
}