postgen command - github.com/incident-io/sdk-go/internal/postgen - Go Packages

postgen

command
v1.0.25 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2026 License: MIT Imports: 11 Imported by: 0

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>

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL