gen.yaml Reference

The gen.yaml file has several sections.

  • The generation section is important for SDK configuration.
  • The management and features 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.

gen.yaml

configVersion: 1.0.0
management:
docChecksum: e77f226f321fb0ac7a96a5349eec64ed
docVersion: 1.0.0
speakeasyVersion: 1.82.3
generationVersion: 2.107.3
generation:
comments:
disableComments: false
omitDescriptionIfSummaryPresent: false
baseServerURL: "speakeasy.bar/public/api/"
sdkClassName: speakeasybar
singleTagPerOp: false
maintainOpenAPIOrder: true
features:
typescript:
core: 2.87.1
examples: 2.81.2
flattening: 2.81.1
globalSecurity: 2.81.1
globalServerURLs: 2.82.0
groups: 2.81.1
nameOverrides: 2.81.1
retries: 2.82.0
typescript:
clientServerStatusCodesAsErrors: true
flattenGlobalSecurity: true
maxMethodParams: 4
version: 0.2.0
author: Speakeasy
installationURL: https://github.com/speakeasy-sdks/speakeasybar
packageName: '@speakeasy/bar'
published: true
repoSubDirectory: .

omitDescriptionIfSummaryPresent

Control whether the summary field is preferred over the description field when documenting methods.

gen.yaml

configVersion: 1.0.0
management:
docChecksum: e77f226f321fb0ac7a96a5349eec64ed
docVersion: 1.0.0
speakeasyVersion: 1.82.3
generationVersion: 2.107.3
generation:
comments:
disableComments: false
omitDescriptionIfSummaryPresent: false
baseServerURL: "speakeasy.bar/public/api/"
sdkClassName: speakeasybar
singleTagPerOp: false
maintainOpenAPIOrder: true
features:
typescript:
core: 2.87.1
examples: 2.81.2
flattening: 2.81.1
globalSecurity: 2.81.1
globalServerURLs: 2.82.0
groups: 2.81.1
nameOverrides: 2.81.1
retries: 2.82.0
typescript:
clientServerStatusCodesAsErrors: true
flattenGlobalSecurity: true
maxMethodParams: 4
version: 0.2.0
author: Speakeasy
installationURL: https://github.com/speakeasy-sdks/speakeasybar
packageName: '@speakeasy/bar'
published: true
repoSubDirectory: .

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.

gen.yaml

configVersion: 1.0.0
management:
docChecksum: e77f226f321fb0ac7a96a5349eec64ed
docVersion: 1.0.0
speakeasyVersion: 1.82.3
generationVersion: 2.107.3
generation:
comments:
disableComments: false
omitDescriptionIfSummaryPresent: false
baseServerURL: "speakeasy.bar/public/api/"
sdkClassName: speakeasybar
singleTagPerOp: false
maintainOpenAPIOrder: true
features:
typescript:
core: 2.87.1
examples: 2.81.2
flattening: 2.81.1
globalSecurity: 2.81.1
globalServerURLs: 2.82.0
groups: 2.81.1
nameOverrides: 2.81.1
retries: 2.82.0
typescript:
clientServerStatusCodesAsErrors: true
flattenGlobalSecurity: true
maxMethodParams: 4
version: 0.2.0
author: Speakeasy
installationURL: https://github.com/speakeasy-sdks/speakeasybar
packageName: '@speakeasy/bar'
published: true
repoSubDirectory: .

sdkClassName

Controls the class name in the SDK.

gen.yaml

configVersion: 1.0.0
management:
docChecksum: e77f226f321fb0ac7a96a5349eec64ed
docVersion: 1.0.0
speakeasyVersion: 1.82.3
generationVersion: 2.107.3
generation:
comments:
disableComments: false
omitDescriptionIfSummaryPresent: false
baseServerURL: "speakeasy.bar/public/api/"
sdkClassName: speakeasybar
singleTagPerOp: false
maintainOpenAPIOrder: true
features:
typescript:
core: 2.87.1
examples: 2.81.2
flattening: 2.81.1
globalSecurity: 2.81.1
globalServerURLs: 2.82.0
groups: 2.81.1
nameOverrides: 2.81.1
retries: 2.82.0
typescript:
clientServerStatusCodesAsErrors: true
flattenGlobalSecurity: true
maxMethodParams: 4
version: 0.2.0
author: Speakeasy
installationURL: https://github.com/speakeasy-sdks/speakeasybar
packageName: '@speakeasy/bar'
published: true
repoSubDirectory: .

singleTagPerOp

Only use the first tag when building namespaces. Use when your methods are associated with multiple tags.

gen.yaml

configVersion: 1.0.0
management:
docChecksum: e77f226f321fb0ac7a96a5349eec64ed
docVersion: 1.0.0
speakeasyVersion: 1.82.3
generationVersion: 2.107.3
generation:
comments:
disableComments: false
omitDescriptionIfSummaryPresent: false
baseServerURL: "speakeasy.bar/public/api/"
sdkClassName: speakeasybar
singleTagPerOp: false
maintainOpenAPIOrder: true
features:
typescript:
core: 2.87.1
examples: 2.81.2
flattening: 2.81.1
globalSecurity: 2.81.1
globalServerURLs: 2.82.0
groups: 2.81.1
nameOverrides: 2.81.1
retries: 2.82.0
typescript:
clientServerStatusCodesAsErrors: true
flattenGlobalSecurity: true
maxMethodParams: 4
version: 0.2.0
author: Speakeasy
installationURL: https://github.com/speakeasy-sdks/speakeasybar
packageName: '@speakeasy/bar'
published: true
repoSubDirectory: .

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.

gen.yaml

configVersion: 1.0.0
management:
docChecksum: e77f226f321fb0ac7a96a5349eec64ed
docVersion: 1.0.0
speakeasyVersion: 1.82.3
generationVersion: 2.107.3
generation:
comments:
disableComments: false
omitDescriptionIfSummaryPresent: false
baseServerURL: "speakeasy.bar/public/api/"
sdkClassName: speakeasybar
singleTagPerOp: false
maintainOpenAPIOrder: true
features:
typescript:
core: 2.87.1
examples: 2.81.2
flattening: 2.81.1
globalSecurity: 2.81.1
globalServerURLs: 2.82.0
groups: 2.81.1
nameOverrides: 2.81.1
retries: 2.82.0
typescript:
clientServerStatusCodesAsErrors: true
flattenGlobalSecurity: true
maxMethodParams: 4
version: 0.2.0
author: Speakeasy
installationURL: https://github.com/speakeasy-sdks/speakeasybar
packageName: '@speakeasy/bar'
published: true
repoSubDirectory: .

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.

gen.yaml

configVersion: 1.0.0
management:
docChecksum: e77f226f321fb0ac7a96a5349eec64ed
docVersion: 1.0.0
speakeasyVersion: 1.82.3
generationVersion: 2.107.3
generation:
comments:
disableComments: false
omitDescriptionIfSummaryPresent: false
baseServerURL: "speakeasy.bar/public/api/"
sdkClassName: speakeasybar
singleTagPerOp: false
maintainOpenAPIOrder: true
features:
typescript:
core: 2.87.1
examples: 2.81.2
flattening: 2.81.1
globalSecurity: 2.81.1
globalServerURLs: 2.82.0
groups: 2.81.1
nameOverrides: 2.81.1
retries: 2.82.0
typescript:
clientServerStatusCodesAsErrors: true
flattenGlobalSecurity: true
maxMethodParams: 4
version: 0.2.0
author: Speakeasy
installationURL: https://github.com/speakeasy-sdks/speakeasybar
packageName: '@speakeasy/bar'
published: true
repoSubDirectory: .

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.

gen.yaml

configVersion: 1.0.0
management:
docChecksum: e77f226f321fb0ac7a96a5349eec64ed
docVersion: 1.0.0
speakeasyVersion: 1.82.3
generationVersion: 2.107.3
generation:
comments:
disableComments: false
omitDescriptionIfSummaryPresent: false
baseServerURL: "speakeasy.bar/public/api/"
sdkClassName: speakeasybar
singleTagPerOp: false
features:
typescript:
core: 2.87.1
examples: 2.81.2
flattening: 2.81.1
globalSecurity: 2.81.1
globalServerURLs: 2.82.0
groups: 2.81.1
nameOverrides: 2.81.1
retries: 2.82.0
typescript:
clientServerStatusCodesAsErrors: true
flattenGlobalSecurity: true
maxMethodParams: 4
version: 0.2.0
author: Speakeasy
installationURL: https://github.com/speakeasy-sdks/speakeasybar
packageName: '@speakeasy/bar'
published: true
repoSubDirectory: .

flattenGlobalSecurity

Enable the security object to be passed inline during the SDK instantiation.

gen.yaml

configVersion: 1.0.0
management:
docChecksum: e77f226f321fb0ac7a96a5349eec64ed
docVersion: 1.0.0
speakeasyVersion: 1.82.3
generationVersion: 2.107.3
generation:
comments:
disableComments: false
omitDescriptionIfSummaryPresent: false
baseServerURL: "speakeasy.bar/public/api/"
sdkClassName: speakeasybar
singleTagPerOp: false
features:
typescript:
core: 2.87.1
examples: 2.81.2
flattening: 2.81.1
globalSecurity: 2.81.1
globalServerURLs: 2.82.0
groups: 2.81.1
nameOverrides: 2.81.1
retries: 2.82.0
typescript:
clientServerStatusCodesAsErrors: true
flattenGlobalSecurity: true
maxMethodParams: 4
version: 0.2.0
author: Speakeasy
installationURL: https://github.com/speakeasy-sdks/speakeasybar
packageName: '@speakeasy/bar'
published: true
repoSubDirectory: .

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.

gen.yaml

configVersion: 1.0.0
management:
docChecksum: e77f226f321fb0ac7a96a5349eec64ed
docVersion: 1.0.0
speakeasyVersion: 1.82.3
generationVersion: 2.107.3
generation:
comments:
disableComments: false
omitDescriptionIfSummaryPresent: false
baseServerURL: "speakeasy.bar/public/api/"
sdkClassName: speakeasybar
singleTagPerOp: false
features:
typescript:
core: 2.87.1
examples: 2.81.2
flattening: 2.81.1
globalSecurity: 2.81.1
globalServerURLs: 2.82.0
groups: 2.81.1
nameOverrides: 2.81.1
retries: 2.82.0
typescript:
clientServerStatusCodesAsErrors: true
flattenGlobalSecurity: true
maxMethodParams: 4
version: 0.2.0
author: Speakeasy
installationURL: https://github.com/speakeasy-sdks/speakeasybar
packageName: '@speakeasy/bar'
published: true
repoSubDirectory: .

version

Set the version number given to the package being produced. We will automatically update this, but you have the option to edit it.

gen.yaml

configVersion: 1.0.0
management:
docChecksum: e77f226f321fb0ac7a96a5349eec64ed
docVersion: 1.0.0
speakeasyVersion: 1.82.3
generationVersion: 2.107.3
generation:
comments:
disableComments: false
omitDescriptionIfSummaryPresent: false
baseServerURL: "speakeasy.bar/public/api/"
sdkClassName: speakeasybar
singleTagPerOp: false
features:
typescript:
core: 2.87.1
examples: 2.81.2
flattening: 2.81.1
globalSecurity: 2.81.1
globalServerURLs: 2.82.0
groups: 2.81.1
nameOverrides: 2.81.1
retries: 2.82.0
typescript:
clientServerStatusCodesAsErrors: true
flattenGlobalSecurity: true
maxMethodParams: 4
version: 0.2.0
author: Speakeasy
installationURL: https://github.com/speakeasy-sdks/speakeasybar
packageName: '@speakeasy/bar'
published: true
repoSubDirectory: .

author

Specify the name that will be displayed in the package manager's author field.

gen.yaml

configVersion: 1.0.0
management:
docChecksum: e77f226f321fb0ac7a96a5349eec64ed
docVersion: 1.0.0
speakeasyVersion: 1.82.3
generationVersion: 2.107.3
generation:
comments:
disableComments: false
omitDescriptionIfSummaryPresent: false
baseServerURL: "speakeasy.bar/public/api/"
sdkClassName: speakeasybar
singleTagPerOp: false
features:
typescript:
core: 2.87.1
examples: 2.81.2
flattening: 2.81.1
globalSecurity: 2.81.1
globalServerURLs: 2.82.0
groups: 2.81.1
nameOverrides: 2.81.1
retries: 2.82.0
typescript:
clientServerStatusCodesAsErrors: true
flattenGlobalSecurity: true
maxMethodParams: 4
version: 0.2.0
author: Speakeasy
installationURL: https://github.com/speakeasy-sdks/speakeasybar
packageName: '@speakeasy/bar'
published: true
repoSubDirectory: .

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.

gen.yaml

configVersion: 1.0.0
management:
docChecksum: e77f226f321fb0ac7a96a5349eec64ed
docVersion: 1.0.0
speakeasyVersion: 1.82.3
generationVersion: 2.107.3
generation:
comments:
disableComments: false
omitDescriptionIfSummaryPresent: false
baseServerURL: "speakeasy.bar/public/api/"
sdkClassName: speakeasybar
singleTagPerOp: false
features:
typescript:
core: 2.87.1
examples: 2.81.2
flattening: 2.81.1
globalSecurity: 2.81.1
globalServerURLs: 2.82.0
groups: 2.81.1
nameOverrides: 2.81.1
retries: 2.82.0
typescript:
clientServerStatusCodesAsErrors: true
flattenGlobalSecurity: true
maxMethodParams: 4
version: 0.2.0
author: Speakeasy
installationURL: https://github.com/speakeasy-sdks/speakeasybar
packageName: '@speakeasy/bar'
published: true
repoSubDirectory: .

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.

gen.yaml

configVersion: 1.0.0
management:
docChecksum: e77f226f321fb0ac7a96a5349eec64ed
docVersion: 1.0.0
speakeasyVersion: 1.82.3
generationVersion: 2.107.3
generation:
comments:
disableComments: false
omitDescriptionIfSummaryPresent: false
baseServerURL: "speakeasy.bar/public/api/"
sdkClassName: speakeasybar
singleTagPerOp: false
features:
typescript:
core: 2.87.1
examples: 2.81.2
flattening: 2.81.1
globalSecurity: 2.81.1
globalServerURLs: 2.82.0
groups: 2.81.1
nameOverrides: 2.81.1
retries: 2.82.0
typescript:
clientServerStatusCodesAsErrors: true
flattenGlobalSecurity: true
maxMethodParams: 4
version: 0.2.0
author: Speakeasy
installationURL: https://github.com/speakeasy-sdks/speakeasybar
packageName: '@speakeasy/bar'
published: true
repoSubDirectory: .

published

Set to false to prevent Speakeasy from publishing your SDK. This is useful if you want to publish your SDK manually.

gen.yaml

configVersion: 1.0.0
management:
docChecksum: e77f226f321fb0ac7a96a5349eec64ed
docVersion: 1.0.0
speakeasyVersion: 1.82.3
generationVersion: 2.107.3
generation:
comments:
disableComments: false
omitDescriptionIfSummaryPresent: false
baseServerURL: "speakeasy.bar/public/api/"
sdkClassName: speakeasybar
singleTagPerOp: false
features:
typescript:
core: 2.87.1
examples: 2.81.2
flattening: 2.81.1
globalSecurity: 2.81.1
globalServerURLs: 2.82.0
groups: 2.81.1
nameOverrides: 2.81.1
retries: 2.82.0
typescript:
clientServerStatusCodesAsErrors: true
flattenGlobalSecurity: true
maxMethodParams: 4
version: 0.2.0
author: Speakeasy
installationURL: https://github.com/speakeasy-sdks/speakeasybar
packageName: '@speakeasy/bar'
published: true
repoSubDirectory: .

repoSubDirectory

Specify a subfolder to hold the SDK. By default, Speakeasy will output the SDK to the root . of the repo.

gen.yaml

configVersion: 1.0.0
management:
docChecksum: e77f226f321fb0ac7a96a5349eec64ed
docVersion: 1.0.0
speakeasyVersion: 1.82.3
generationVersion: 2.107.3
generation:
comments:
disableComments: false
omitDescriptionIfSummaryPresent: false
baseServerURL: "speakeasy.bar/public/api/"
sdkClassName: speakeasybar
singleTagPerOp: false
features:
typescript:
core: 2.87.1
examples: 2.81.2
flattening: 2.81.1
globalSecurity: 2.81.1
globalServerURLs: 2.82.0
groups: 2.81.1
nameOverrides: 2.81.1
retries: 2.82.0
typescript:
clientServerStatusCodesAsErrors: true
flattenGlobalSecurity: true
maxMethodParams: 4
version: 0.2.0
author: Speakeasy
installationURL: https://github.com/speakeasy-sdks/speakeasybar
packageName: '@speakeasy/bar'
published: true
repoSubDirectory: .

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.

gen.yaml

configVersion: 1.0.0
management:
docChecksum: e77f226f321fb0ac7a96a5349eec64ed
docVersion: 1.0.0
speakeasyVersion: 1.82.3
generationVersion: 2.107.3
generation:
comments:
disableComments: false
omitDescriptionIfSummaryPresent: false
baseServerURL: "speakeasy.bar/public/api/"
sdkClassName: speakeasybar
singleTagPerOp: false
features:
typescript:
core: 2.87.1
examples: 2.81.2
flattening: 2.81.1
globalSecurity: 2.81.1
globalServerURLs: 2.82.0
groups: 2.81.1
nameOverrides: 2.81.1
retries: 2.82.0
typescript:
clientServerStatusCodesAsErrors: true
flattenGlobalSecurity: true
maxMethodParams: 4
version: 0.2.0
author: Speakeasy
installationURL: https://github.com/speakeasy-sdks/speakeasybar
packageName: '@speakeasy/bar'
published: true
repoSubDirectory: .