Skip to content

Commit 151d6ca

Browse files
tstanmay13github-actions[bot]
authored andcommitted
update changelogs
1 parent 8d7eec1 commit 151d6ca

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+

0 commit comments

Comments
 (0)