Deprecations
The OpenAPI specification allows you to deprecate various parts of your API, such as methods, parameters, and properties. When you deprecate a part of your API, the SDK will generate relevant deprecated
annotations in the code and add a ⚠️ Deprecated
label to the SDK docs.
Along with this there are various Speakeasy extensions available to customize the messaging of the deprecated items.
Deprecate Methods
You can deprecate methods in your SDK by using the deprecated
field in your OpenAPI schema. This will add a deprecated
annotation to the generated method and add a ⚠️ Deprecated
label to the SDK docs.
Using x-speakeasy-deprecation-message
will allow you to customize the deprecation message that is displayed in code and in the SDK docs.
While using x-speakeasy-deprecation-replacement
will allow you to specify the method that should be used instead of the deprecated method.
Deprecate Parameters
You can deprecate parameters in your SDK by using the deprecated
field in your OpenAPI schema. This will add a deprecated
annotation to the corresponding field in the generated objects and remove the parameter from any relevant usage examples in the SDK docs.
Using x-speakeasy-deprecation-message
will allow you to customize the deprecation message that is displayed in code and in the SDK docs.
Deprecate Properties
You can deprecate properties in your SDK by using the deprecated
field in your OpenAPI schema. This will add a deprecated
annotation to the corresponding property in the generated objects and remove the property from any relevant usage examples in the SDK docs.
Using x-speakeasy-deprecation-message
will allow you to customize the deprecation message that is displayed in code and in the SDK docs.