File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
fern/products/sdks/overview/java/changelog Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ ## 3.0.0
2+ ** ` (break): ` ** The SDK generator now defaults to forward-compatible enums, providing resilience against new enum variants
3+ added on the backend. This is a breaking change that affects the structure of generated enum types.
4+
5+ To revert to the previous behavior with traditional Java enums, add the following configuration to your
6+ ` generators.yml ` file:
7+ ``` yaml
8+ generators :
9+ - name : fernapi/fern-java-sdk
10+ config :
11+ enable-forward-compatible-enums : false
12+ ` ` `
13+
14+
15+ **` (feat):`** Forward-compatible enums are now enabled by default. Generated SDKs will no longer throw errors when
16+ encountering unknown enum variants, instead handling them gracefully with an UNKNOWN value. This is
17+ particularly important for :
18+ - Mobile applications that cannot be easily updated
19+ - Maintaining backward compatibility when backend adds new enum values
20+ - Arrays of enum values where new variants previously caused client failures
21+
22+ With forward-compatible enums, the generated code changes from traditional Java enums to class-based
23+ enums that support unknown values through a visitor pattern.
24+
25+
You can’t perform that action at this time.
0 commit comments