Conventions & Design Decisions
The conventions and trade-offs baked into the generated code.
The generator follows a fixed set of conventions so the output is predictable. These are the decisions and the trade-offs behind them.
Conventions
GET/HEADare queries; everything else is a mutation.- Single object argument: every api/query/mutation takes one object with keys
{ ...pathParams, body, params, headers }— order-independent and safe with multiple path params. Functions with no inputs take no argument. params/headersobjects are optional only when every contained parameter is optional.- Responses use the first
2xxresponse’sapplication/jsonschema (falls back todefault, thenvoid). - Multi-tag operations are emitted into every controller they’re tagged with (matching how Swagger UI groups them).
- Per-controller, self-contained types. A schema referenced by two controllers is generated in both
types.tsfiles — keeps each folder independent, at the cost of some duplication. - The output directory is wiped on every run so deletions in the spec propagate. Never hand-edit generated files — they carry an
AUTO-GENERATEDheader.
Related
- Naming Rules — how names are derived.
- Limitations & Roadmap — what is not yet supported.