{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/3gppscout-com/json-schema/3gppscout-com-tdoc-search-request-schema.json",
  "title": "TdocSearchRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/3gppscout-com-tdocs-api-openapi.yml#/components/schemas/TdocSearchRequest",
  "properties": {
    "query": {
      "type": "string",
      "maxLength": 1000,
      "minLength": 2,
      "title": "Query",
      "description": "What the TDocs should discuss, in plain words or exact terms, e.g. 'timing advance pre-compensation for NTN', 'ta-CommonDrift', 'R2-2008188'."
    },
    "filters": {
      "$ref": "#/$defs/TdocSearchFilters",
      "description": "Catalog filters, the same fields as GET /tdocs."
    },
    "unit_types": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Unit Types",
      "description": "Only chunks holding these units: 'proposal', 'observation', or 'body' (text outside numbered proposals and observations)."
    },
    "rerank_top_k": {
      "type": "integer",
      "maximum": 50.0,
      "minimum": 1.0,
      "title": "Rerank Top K",
      "description": "Results to return after reranking.",
      "default": 10
    },
    "max_per_tdoc": {
      "type": "integer",
      "maximum": 10.0,
      "minimum": 1.0,
      "title": "Max Per Tdoc",
      "description": "At most this many passages from one TDoc. Use 1 for a list of distinct TDocs.",
      "default": 2
    },
    "include_text": {
      "type": "boolean",
      "title": "Include Text",
      "description": "Include each passage's text.",
      "default": true
    },
    "rerank": {
      "type": "boolean",
      "title": "Rerank",
      "description": "Rerank candidates for precision. Leave true.",
      "default": true
    }
  },
  "type": "object",
  "required": [
    "query"
  ],
  "$defs": {
    "TdocSearchFilters": {
      "properties": {
        "source": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source",
          "description": "Company name, alias, or org_id, e.g. 'Mavenir' or 'huawei'. Matches TDocs where it is a submitter or co-submitter."
        },
        "meeting": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Meeting",
          "description": "Meeting IDs, e.g. 'R1-126' or 'RAN1#126'."
        },
        "group": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Group",
          "description": "Groups, e.g. 'R1', 'RAN2', 'S2'."
        },
        "agenda_item": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Agenda Item",
          "description": "Agenda items; '10.7' also matches 10.7.1."
        },
        "doc_kind": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Doc Kind",
          "description": "Kinds: contribution, pcr, cr, draft_cr, cr_pack, summary, way_forward, ls_in, ls_out, report, chair_notes, agenda, wid, sid, status_report, work_plan, draft_spec."
        },
        "status": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Status",
          "description": "Register statuses, e.g. 'agreed,approved' or 'noted'. Joined from the register at query time."
        },
        "work_item": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Work Item",
          "description": "Work item code, e.g. 'NR_NTN_Ph3-Core'."
        },
        "spec": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Spec",
          "description": "Target spec number, e.g. '38.213'."
        },
        "release": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Release",
          "description": "Release, e.g. 'Rel-20'."
        },
        "since": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Since",
          "description": "Meetings starting on or after this date (YYYY-MM-DD)."
        },
        "until": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Until",
          "description": "Meetings starting on or before this date (YYYY-MM-DD)."
        }
      },
      "type": "object",
      "title": "TdocSearchFilters",
      "description": "Catalog filters, the same fields as GET /tdocs. Comma-separated values match any of them."
    }
  }
}