Context
frontend/src/api/schema.ts is hand-written and verified against the live backend, because qh's /openapi.json previously emitted empty request/response schemas. With i2mint/qh#9, qh now derives full JSON Schema from the Python type hints — so the frontend's API types can be generated from the spec instead of hand-maintained.
Plan
Refs i2mint/qh#9.
Context
frontend/src/api/schema.tsis hand-written and verified against the live backend, becauseqh's/openapi.jsonpreviously emitted empty request/response schemas. With i2mint/qh#9,qhnow derives full JSON Schema from the Python type hints — so the frontend's API types can be generated from the spec instead of hand-maintained.Plan
frontend/src/api/openapi.json(the API contract snapshot), via a smallbackend/export_openapi.pyscript.openapi-typescriptand agen:apiscript; generatefrontend/src/api/openapi.d.tsfrom the spec.schema.tswith thin named aliases (CorpusInfo,Segment,SearchHit,ExploreResult,CreateCorpusBody,QueryBody,ExploreBody) derived from the generated types — keeps all 8 consumer files untouched.tsctypechecks and the app runs end-to-end against the backend.Refs i2mint/qh#9.