Persistent edits: Add custom code anywhere in your generated SDKs
Blog post from Speakeasy
Speakeasy has introduced a feature called "persistent edits," which allows developers to make and maintain arbitrary changes to generated SDKs and Terraform providers from OpenAPI specifications. This feature addresses the limitations of the previous approach, where the code generator owned the generated files, requiring users to either wait for new configuration options or manage changes separately. Persistent edits enable users to add utility methods, modify configuration files, and extend SDK initialization directly within the generated code, with changes persisting across regenerations unless they conflict with Speakeasy's updates. This is achieved through a conflict detection system similar to git merge, allowing seamless coexistence of user and system updates. The feature is available to all Speakeasy users and requires simple configuration adjustments to enable it, ensuring that generated code becomes a flexible foundation rather than a restrictive black box.