Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Args ¶
type Args struct {
OutputDir string // must be a directory path
OutputPkg string // must be a Go import-path
OutputFile string
GoHeaderFile string
// ReportFilename is added to Args for specifying name of report file used
// by API linter. If specified, API rule violations will be printed to report file.
// Otherwise default value "-" will be used which indicates stdout.
ReportFilename string
// OutputModelNameFile is the name of the file to be generated for OpenAPI schema name
// accessor functions. If empty, no model name accessor functions are generated.
// When this is specified, the OpenAPI spec generator will use the function names
// instead of Go type names for schema names.
OutputModelNameFile string
// ReadOnlyPkgs is a list of package paths that should be treated as
// read-only. Model name files will not be generated for these packages.
// This prevents the generator from attempting to write into read-only
// dependency packages (e.g. in the Go module cache).
ReadOnlyPkgs []string
}
func New ¶
func New() *Args
New returns default arguments for the generator. Returning the arguments instead of using default flag parsing allows registering custom arguments afterwards
Click to show internal directories.
Click to hide internal directories.