mirror of
https://github.com/jlengrand/openapi-generator.git
synced 2026-05-15 15:54:17 +00:00
Ignore null fields in model serialization
in Java clients. Closes #1413
This commit is contained in:
@@ -23,10 +23,9 @@ public class JSON {
|
||||
public JSON(ApiClient apiClient) {
|
||||
this.apiClient = apiClient;
|
||||
gson = new GsonBuilder()
|
||||
.serializeNulls()
|
||||
.registerTypeAdapter(Date.class, new DateAdapter(apiClient))
|
||||
.create();
|
||||
}
|
||||
}
|
||||
|
||||
public Gson getGson() {
|
||||
return gson;
|
||||
|
||||
Reference in New Issue
Block a user