fern-api / fern

Input OpenAPI. Output SDKs and Docs.
https://buildwithfern.com
MIT License
2.45k stars 118 forks source link

(java, improvement): change default `JsonInclude` behavior #3978

Closed dcb6 closed 2 days ago

dcb6 commented 3 days ago

The SDK generator now adds a class-level @JsonInclude(JsonInclude.Include.NON_ABSENT) annotation to each generated type in place of the previous @JsonInclude(JsonInclude.Include.NON_EMPTY) by default. This ensures that required empty collection fields are not removed from request or response json. This is configurable in the generators.yml file:

minor: java model seed source mode is also configured / enabled in this PR