Home / Companies / Speakeasy / Blog / Post Details
Content Deep Dive

Evolving enums for evolving APIs

Blog post from Speakeasy

Post Details
Company
Date Published
Author
Georges Haidar
Word Count
1,616
Company Posts That Month
7
Language
English
Hacker News Points
-
Post removed?
No
Summary

Speakeasy has introduced support for "open" enums in their Go, Python, and TypeScript SDK generators to accommodate evolving APIs without causing dependency management issues for users. Traditional "closed" enums restrict values to a predefined set, posing challenges when APIs are updated with new values, such as adding a new category in a content management system API. By using the x-speakeasy-unknown-values extension in OpenAPI, developers can mark certain enums as open, allowing for unrecognized values to be handled gracefully. This approach ensures that SDKs remain functional and type-safe even as APIs evolve, while maintaining a robust developer experience with features like editor auto-complete. This enhancement aims to address longstanding challenges in handling enums within APIs, providing a flexible solution that allows API evolution without disrupting existing users.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Developer Experience 1 386 181 87 +52%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.