Keep configuration reference aligned with public types and document callback parameters
Description
The configuration reference is hand-written MDX and can drift from the public TypeScript configuration types. Several callback options expose parameters whose shape is undocumented.
For example, output.override.header accepts:
(info: OpenApiInfoObject) => string[] | stringThe docs use info.title in an example but do not explain what info contains.
Current behavior
OpenApiInfoObject is the OpenAPI Info Object and includes optional fields such as:
titledescriptiontermsOfServicecontactlicenseversion
Neither the callback option nor the aliased type documents this shape locally.
This is not limited to header: other public configuration callbacks and options have incomplete or missing JSDoc.
The configuration pages are hand-written MDX. Only roughly 10% of user-facing configuration fields currently have JSDoc, so fully generating the reference from types would currently produce mostly incomplete pages.
Discussion
TypeDoc and its Markdown plugin are already used by this repository, so generating type-derived documentation or validation is technically possible without a new dependency.
Possible directions:
- Document public configuration types and callback parameters in JSDoc, starting with
headerandOpenApiInfoObject. - Generate reference fragments from those annotations and embed them in curated MDX pages.
- Add CI validation that detects stale generated fragments or undocumented public configuration fields.
- Keep rich explanatory material, examples, callouts, and guides hand-written.
A GitHub Action that automatically commits documentation changes seems less useful than a deterministic local generation command plus a CI drift check.
Source: orval-labs/orval