Language Targets
How to configure per-language codegen — package metadata, style rules, and feature flags.
Each entry in the languages array configures generation for a single target language. Generators MUST skip languages they do not support rather than failing.
Supported Languages
go · typescript · python · java · kotlin · ruby · rust · csharp · php · swift · dart · scala · elixir · c · cpp
Package Configuration
Describes how the generated code should be packaged and published.
languages:
- language: go
package:
name: "github.com/acme/acme-go"
module: "acme-go"
version: "2.1.0" # defaults to sdk.version if omitted
registry: pkg.go.dev
| Field | Description |
|---|---|
name | Package name in the target ecosystem. |
version | Package version. Defaults to sdk.version. |
module | Module or namespace (Go module path, Java group ID, etc.). |
registry | npm · pypi · crates.io · pkg.go.dev · maven · nuget · rubygems · packagist · pub · hex · custom |
registryUrl | Custom registry URL. Only used when registry is custom. |
Style Configuration
Controls naming conventions and type representations in generated code.
style:
naming: snake_case
modelNaming: PascalCase
operationNaming: PascalCase
enumStyle: native
optionalStyle: pointer
dateStyle: native
fileNaming: snake_case
| Field | Allowed Values | Description |
|---|---|---|
naming | camelCase snake_case PascalCase kebab-case SCREAMING_SNAKE_CASE | Default for fields, parameters, and variables. |
modelNaming | same | Convention for model/schema types. Defaults to naming. |
operationNaming | same | Convention for operation/method names. Defaults to naming. |
enumStyle | string-union numeric-enum string-enum const-object native | How enums are represented. |
optionalStyle | question-mark null-union option-type pointer wrapper | How optional fields are typed. |
dateStyle | string native library | How date/datetime fields are typed. |
dateLibrary | string | Date library when dateStyle is library. E.g. dayjs, java.time, chrono. |
fileNaming | camelCase snake_case kebab-case PascalCase | Convention for generated source file names. |
Feature Configuration
Declares high-level behaviors the generated SDK must include.
Authentication
features:
auth: bearer
# or multiple schemes:
auth:
- oauth2-authorization-code
- api-key
Supported values: none · api-key · bearer · basic · oauth2-client-credentials · oauth2-authorization-code · oauth2-device-code · oidc
Generators MUST emit authentication helpers for all listed schemes.
Retries
features:
retries:
enabled: true
maxAttempts: 3
backoff: exponential # exponential | linear | fixed
retryOn: [429, 500, 502, 503, 504]
When retries: true is used as shorthand, generators apply their own defaults.
Pagination
features:
pagination:
strategy: cursor # cursor | offset | page | link-header | none
iteratorHelper: true # emit transparent iterator / generator helper
defaultPageSize: 100
Generators that support iterators MUST emit them when iteratorHelper is true.
Feature Flags
| Flag | Type | Default | Description |
|---|---|---|---|
reconciliation | string | none | none · terraform · kubernetes · pulumi · custom |
driftDetection | bool | false | Emit helpers to detect state drift. |
webhooks | bool | false | Generate webhook payload types and HMAC signature verification. |
mocking | bool | false | Generate a mock client for testing. |
examples | bool | true | Generate usage examples from OpenAPI example objects. |
context | bool | false | Thread a context/cancellation token through all calls (Go). |
streaming | bool | false | Generate streaming response helpers (SSE, chunked). |
telemetry.enabled | bool | false | Emit OpenTelemetry instrumentation. |
telemetry.traces | bool | true | Include trace spans. |
telemetry.metrics | bool | false | Include metrics instrumentation. |
Operation Overrides
Per-operation customizations declared inside a language target, taking precedence over global config.
operationOverrides:
- operationId: getInternalStatus
ignore: true # exclude from SDK entirely
- operationId: createWidget
methodName: NewWidget # idiomatic rename
- operationId: legacyList
deprecated: true # force deprecated regardless of spec
- operationId: customCreate
customImplementation: ./custom/impl/customCreate.go
Additional Properties
Arbitrary key-value pairs passed through to the underlying generator. Useful for generator-specific options not covered by the spec.
additionalProperties:
usePromises: true
treeshakable: true
pydanticVersion: "v2"
generateInterfaces: true
Language Default Conventions
Idiomatic defaults a generator SHOULD apply when a style field is omitted.
| Language | naming | modelNaming | enumStyle | optionalStyle | dateStyle |
|---|---|---|---|---|---|
| go | snake_case | PascalCase | native | pointer | native |
| typescript | camelCase | PascalCase | string-union | question-mark | string |
| python | snake_case | PascalCase | string-enum | null-union | native |
| java | camelCase | PascalCase | native | wrapper | library |
| kotlin | camelCase | PascalCase | native | null-union | library |
| ruby | snake_case | PascalCase | string-enum | null-union | native |
| rust | snake_case | PascalCase | native | option-type | library |
| csharp | PascalCase | PascalCase | native | null-union | native |
| php | snake_case | PascalCase | string-enum | null-union | string |
| swift | camelCase | PascalCase | native | option-type | native |