gen.yaml Reference
The gen.yaml
file has several sections.
- The
generation
section is important for SDK configuration. - The
management
andfeatures
sections are maintained by Speakeasy. You should not edit these sections. - The final section is for configuring SDK publishing and contains configuration specific to the generation language, for example,
typescript
. For more information, see package publishing.
Let's take a closer look at the gen.yaml
configs you may want to edit.
Full Reference
Generation
disableComments
Control whether code comments are added as part of the SDK creation.
omitDescriptionIfSummaryPresent
Control whether the summary
field is preferred over the description
field when documenting methods.
baseServerURL
Declare your base server URL if the servers
field is absent from your spec.
Override your spec's servers
field if it is present.
sdkClassName
Controls the class name in the SDK.
singleTagPerOp
Only use the first tag
when building namespaces. Use when your methods are associated with multiple tags
.
maintainOpenAPIOrder
Maintain the order of parameters, properties, operations and more as they appear in the OpenAPI spec when generating the SDK.
If this is set to false
, the order of parameters, properties, operations and more will be sorted alphabetically.
disableComments
Control whether code comments are added as part of the SDK creation.
omitDescriptionIfSummaryPresent
Control whether the summary
field is preferred over the description
field when documenting methods.
baseServerURL
Declare your base server URL if the servers
field is absent from your spec.
Override your spec's servers
field if it is present.
Language Configs
clientServerStatusCodesAsErrors
Set to false
to treat error code responses as a standard response object. This overrides the default behavior of the SDK treating 4XX
or 5XX
responses as returning error
objects.
flattenGlobalSecurity
Enable the security object to be passed inline during the SDK instantiation.
maxMethodParams
Set a threshold on the number of parameters that can be passed inline to an SDK method. Methods that require more parameters to be passed in will require a request parameters object to be passed in.
version
Set the version number given to the package being produced. We will automatically update this, but you have the option to edit it.
author
Specify the name that will be displayed in the package manager's author
field.
installationURL
Specify the URL that will be displayed in the package manager's installation
field. This will be the GitHub repo URL if the package has not been published, otherwise it will be the package manager URL.
packageName
Specify what your package will be called. The format of this will need to match the package manager that you're publishing to. Please see publish your SDK.
published
Set to false
to prevent Speakeasy from publishing your SDK. This is useful if you want to publish your SDK manually.
repoSubDirectory
Specify a subfolder to hold the SDK. By default, Speakeasy will output the SDK to the root .
of the repo.
clientServerStatusCodesAsErrors
Set to false
to treat error code responses as a standard response object. This overrides the default behavior of the SDK treating 4XX
or 5XX
responses as returning error
objects.
flattenGlobalSecurity
Enable the security object to be passed inline during the SDK instantiation.
maxMethodParams
Set a threshold on the number of parameters that can be passed inline to an SDK method. Methods that require more parameters to be passed in will require a request parameters object to be passed in.
version
Set the version number given to the package being produced. We will automatically update this, but you have the option to edit it.
author
Specify the name that will be displayed in the package manager's author
field.
installationURL
Specify the URL that will be displayed in the package manager's installation
field. This will be the GitHub repo URL if the package has not been published, otherwise it will be the package manager URL.
packageName
Specify what your package will be called. The format of this will need to match the package manager that you're publishing to. Please see publish your SDK.
published
Set to false
to prevent Speakeasy from publishing your SDK. This is useful if you want to publish your SDK manually.
repoSubDirectory
Specify a subfolder to hold the SDK. By default, Speakeasy will output the SDK to the root .
of the repo.