List of Speakeasy extensions

ExtensionDescriptionDocs
x-speakeasy-name-overrideUsed globally to change method names or inline to change the name of a method, parameter, or class.Full docs
x-speakeasy-groupAllows defining custom namespaces when adding this property to any operation in the OpenAPI spec. If added, the tags for that method will be ignored and the value of x-speakeasy-group will define the namespace for that method instead.Full docs
x-speakeasy-ignoreExcludes specific methods from the SDK.Full docs
x-speakeasy-enumsControls generated enum members by providing alternative names for each value in the enum field.Full docs
x-speakeasy-enum-formatCustomizes how the enum type is generated for the schema, either enum for a native enum type or union for a union of values.Full docs
x-speakeasy-retriesEnables retries globally or on a per-request basis. A backoff strategy is applied to specified status codes.Full docs
x-speakeasy-paginationCustomizes offset- or cursor-based pagination rules for each API operation.Full docs
x-speakeasy-usage-exampleFeatures a method in the SDK’s README.md when added to the method.Full docs
x-speakeasy-exampleThe OpenAPI specification doesn’t allow example values for securityscheme property. This extension overcomes this limitation.Full docs
x-speakeasy-docsConfigures comments that only appear in the SDK for a single language.Full docs
x-speakeasy-globalsDefines parameters that can be configured globally on the main SDK instance and populated automatically for any operations that use them.Full docs
x-speakeasy-globals-hiddenDefines parameters that can be configured globally on the main SDK instance but are not shown in the matching method’s signature.Full docs
x-speakeasy-errorsApplied at the level of paths, path item, or operation in the document to override the default error-handling behavior of the SDKs.Full docs
x-speakeasy-error-messageUsed to mark a field in an error response as containing the error message to use.Full docs
x-speakeasy-server-idEnables server selection when instantiating the SDK. Defines an ID for each server in the servers array in the OpenAPI spec.Full docs
x-speakeasy-deprecation-messageAllows adding a message to deprecated operations, parameters, and schemas.Full docs
x-speakeasy-deprecation-replacementAllows specifying an alternate operation to use in place of a deprecated operation.Full docs
x-speakeasy-type-overrideOverrides a schema’s type, forcing it to be handled as any to accept arbitrary data.Full docs
x-speakeasy-max-method-paramsSets the maximum number of parameters that can be passed to a method. If the number of parameters exceeds this value, a request object will be used instead.Full docs
x-speakeasy-param-encoding-overrideWhen set with a value of allowReserved, path parameters appear in a request URL with reserved characters :/?#[]@!$&'()*+,;= unencoded. Currently in Java only.Full docs

The x-speakeasy-extension-rewrite extension maps any extension from the wider OpenAPI ecosystem or another vendor to the equivalent Speakeasy extension. This allows using existing OpenAPI specs without needing to make changes, if necessary.

openapi: 3.1.0
info:
title: My API
version: 1.0.0
x-speakeasy-extension-rewrite:
x-speakeasy-enums: x-enum-varnames # Maps x-enum-varnames used by the OSS generator to x-speakeasy-enums which has the same functionality

Terraform-specific extensions

Terraform extensionDescriptionDocs
x-speakeasy-entityMap API entities to Terraform resources by annotating objects in your OpenAPI spec as entities in the Terraform provider.Full docs
x-speakeasy-entity-operationSpecify CRUD operations for API endpoints to map to Terraform resources, such as create, read, update, or delete operations.Full docs
x-speakeasy-name-overrideRemap API properties to Terraform attribute names while keeping API data handling intact.Full docs
x-speakeasy-param-sensitiveHide sensitive properties from Terraform console output for security purposes.Full docs
x-speakeasy-terraform-ignoreUse this extension to exclude properties from Terraform state management.Full docs
x-speakeasy-type-overrideAllows the conversion of an attribute to a JSON string, accommodating dynamic structures in Terraform configurations.Full docs
x-speakeasy-plan-validatorsAdd custom validation logic to Terraform plan operations to ensure configurations meet predefined criteria before execution.Full docs
x-speakeasy-plan-modifiersAdd custom plan modification logic to Terraform plan operations for advanced default values or resource replacement logic.Full docs
x-speakeasy-entity-versionSpecify the version of a Terraform resource to support state migrations for breaking changes.Full docs
x-speakeasy-conflicts-withIndicate conflicting properties to prevent incompatible combinations in Terraform configurations.Full docs
x-speakeasy-param-readonlyMark properties as read-only in Terraform, preventing modifications by the user.Full docs
x-speakeasy-param-optionalForce a property to be optional, overriding the required attribute in JSON Schema specifications.Full docs
x-speakeasy-param-force-newForce resource recreation in Terraform when certain property values change.Full docs
x-speakeasy-terraform-plan-onlyEnsure that only values from the Terraform plan are used during updates, overriding prior state or default values.Full docs