You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These options may be applied as additional-properties (cli) or configOptions (plugins). Refer to configuration docs for more details.
Option
Description
Values
Default
disallowAdditionalPropertiesIfNotPresent
If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
false
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
true
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
true
enumClassPrefix
Prefix enum with class name
false
generateInterfaces
Generate interfaces for api classes
false
generateMarshalJSON
Generate MarshalJSON method
true
generateUnmarshalJSON
Generate UnmarshalJSON method
true
hideGenerationTimestamp
Hides the generation timestamp when files are generated.
true
isGoSubmodule
whether the generated Go module is a submodule
false
packageName
Go package name (convention: lowercase).
openapi
packageVersion
Go package version.
1.0.0
prependFormOrBodyParameters
Add form or body parameters to the beginning of the parameter list.
false
structPrefix
whether to prefix struct with the class name. e.g. DeletePetOpts => PetApiDeletePetOpts
false
useDefaultValuesForRequiredVars
Use default values for required variables when available
false
useOneOfDiscriminatorLookup
Use the discriminator's mapping in oneOf to speed up the model lookup. IMPORTANT: Validation (e.g. one and only one match in oneOf's schemas) will be skipped.
false
withAWSV4Signature
whether to include AWS v4 signature support
false
withGoMod
Generate go.mod and go.sum
true
withXml
whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)