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
FieldDescription
namePackage name in the target ecosystem.
versionPackage version. Defaults to sdk.version.
moduleModule or namespace (Go module path, Java group ID, etc.).
registrynpm · pypi · crates.io · pkg.go.dev · maven · nuget · rubygems · packagist · pub · hex · custom
registryUrlCustom 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
FieldAllowed ValuesDescription
namingcamelCase snake_case PascalCase kebab-case SCREAMING_SNAKE_CASEDefault for fields, parameters, and variables.
modelNamingsameConvention for model/schema types. Defaults to naming.
operationNamingsameConvention for operation/method names. Defaults to naming.
enumStylestring-union numeric-enum string-enum const-object nativeHow enums are represented.
optionalStylequestion-mark null-union option-type pointer wrapperHow optional fields are typed.
dateStylestring native libraryHow date/datetime fields are typed.
dateLibrarystringDate library when dateStyle is library. E.g. dayjs, java.time, chrono.
fileNamingcamelCase snake_case kebab-case PascalCaseConvention 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

FlagTypeDefaultDescription
reconciliationstringnonenone · terraform · kubernetes · pulumi · custom
driftDetectionboolfalseEmit helpers to detect state drift.
webhooksboolfalseGenerate webhook payload types and HMAC signature verification.
mockingboolfalseGenerate a mock client for testing.
examplesbooltrueGenerate usage examples from OpenAPI example objects.
contextboolfalseThread a context/cancellation token through all calls (Go).
streamingboolfalseGenerate streaming response helpers (SSE, chunked).
telemetry.enabledboolfalseEmit OpenTelemetry instrumentation.
telemetry.tracesbooltrueInclude trace spans.
telemetry.metricsboolfalseInclude 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.

LanguagenamingmodelNamingenumStyleoptionalStyledateStyle
gosnake_casePascalCasenativepointernative
typescriptcamelCasePascalCasestring-unionquestion-markstring
pythonsnake_casePascalCasestring-enumnull-unionnative
javacamelCasePascalCasenativewrapperlibrary
kotlincamelCasePascalCasenativenull-unionlibrary
rubysnake_casePascalCasestring-enumnull-unionnative
rustsnake_casePascalCasenativeoption-typelibrary
csharpPascalCasePascalCasenativenull-unionnative
phpsnake_casePascalCasestring-enumnull-unionstring
swiftcamelCasePascalCasenativeoption-typenative