Documentation
¶
Overview ¶
Command postgen post-processes the oapi-codegen output so the generated file presents a clean public surface:
- The low-level request builders (NewXxxRequest / NewXxxRequestWithBody) and response parsers (ParseXxxResponse) are unexported. They remain fully functional (all callers are in-package) but disappear from the docs, so the package leads with ClientWithResponses and its endpoint methods.
- Methods for operations marked `deprecated: true` in the OpenAPI schema get a `// Deprecated:` doc comment, which pkg.go.dev renders prominently and staticcheck (SA1019) flags at call sites.
It edits the source as text (using AST positions) so it needs no third-party dependencies and can't perturb comment placement.
Usage: postgen <generated.go> <schema.json>
Click to show internal directories.
Click to hide internal directories.