Skip to main content

Specify Additional Configuration

SDK Generation can be run on an OpenAPI document without any prior configuration. The generator will use default values to allow you to just easily generate a SDK and see the output. The generator SDK can be used by importing the local package into your project as is. However, to productionize the SDK, and get it ready to publish to the relevant package manager you will likely want to configure the SDK for your needs.

Setup

The SDK Generator supports generating SDKs in a repo per language or in a monorepo containing SDKs for multiple languages.

To configure the generation create a gen.yaml file in one of two locations:

  • The root of your repo for either a repo per language or a monorepo.
  • The output directory of a particular language for a monorepo.

Configuration Options

All the configuration options below are optional.

go:
packagename: "github.com/speakeasy-api/speakeasy-client-sdk-go" # The package name for the generated Go SDK. Should be based on the `go get` package name that would be used to get the SDK. Defaults to `openapi`.
version: "1.0.0" # A semantic version for the generated Go SDK. Defaults to `0.0.1`.
python:
packagename: "speakeasy-client-sdk-python" # The package name for the generated Python SDK. Should be based on the `pip install` package name that would be used to get the SDK. Defaults to `openapi`.
version: "1.0.0" # A semantic version for the generated Python SDK. Defaults to `0.0.1`.
author: "Speakeasy API" # A string representing the author used to populate the Python packages `setup.py` for details published to PyPi. Defaults to `Speakeasy`.
description: "Client SDK for the Speakeasy API" # A string representing the description used to populate the Python packages `setup.py` for details published to PyPi. Defaults to `Python Client SDK Generated by Speakeasy`.
typesript:
packagename: "@speakeasyapi/speakeasy-client-sdk-typescript" # The package name for the generated TypeScript SDK. Should be based on the `npm install` package name that would be used to get the SDK. Defaults to `openapi`.
version: "1.0.0" # A semantic version for the generated TypeScript SDK. Defaults to `0.0.1`.
author: "Speakeasy API" # A string representing the author used to populate the TypeScript packages `package.json` for details published to NPM. Defaults to `Speakeasy`.
java:
packagename: "dev.speakeasyapi.javasdk" # The package name for the generated Java SDK. Defaults to `openapi`.
projectname: "speakeasy-client-sdk-java" # The project name for the generated Java SDK. Defaults to `openapi`.
version: "1.0.0" # A semantic version for the generated Java SDK. Defaults to `0.0.1`.
comments:
disabled: false # A boolean indicating whether or not to include comments in the generated SDK. Defaults to `false`.
omitdescriptionifsummarypresent: false # A boolean indicating whether or not to omit the description of an operation if the summary is present. Defaults to `false`.
baseserverurl: "https://api.speakeasyapi.dev" # The base server URL to use to make requests to the API. Needed if the OpenAPI document does not contain a `servers` object. Defaults to "".
telemetryenabled: true # A boolean indicating whether or not to include telemetry in the generated SDK. Defaults to `false`.