You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because the getter get$Type() looks a little bit different than the $type field annotated with @JsonProperty("$_type"), jackson serializes the object like this:
Given this spec:
It generates:
Because the getter
get$Type()
looks a little bit different than the$type
field annotated with@JsonProperty("$_type")
, jackson serializes the object like this:Because all fields are generated with a proper
@JsonProperty
, discovery of the getters should be disabled when doing the serialization.This can be configured in the generated JSON class:
openapi-generator/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/JSON.java
Lines 16 to 30 in 411199b
By adding a disable command for:
More info: https://stackoverflow.com/questions/25893985/jackson-how-to-serialize-only-annotated-properties
The text was updated successfully, but these errors were encountered: