#3786·orval

Keep configuration reference aligned with public types and document callback parameters

Author: aqeelatCreated Jul 30, 2026Updated Sep 20, 2026
Labelsdocumentation

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:

typescript
(info: OpenApiInfoObject) => string[] | string

The 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:

  • title
  • description
  • termsOfService
  • contact
  • license
  • version

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 header and OpenApiInfoObject.
  • 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.