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
When using serializationLibrary micronaut_serde_jackson the getters and setters in the generated code is missing the @JsonProperty annotation that is used for serializationLibrary jackson.
If fields in a JSON document does not use camel case notation, then it might not be possible to read the document with the JsonProperty annotation missing. The field myName is then fine, but fields like my_name, MyName, "My Name", "MY_NAME" etc will not work.
It is not possible to deserialize the test document above using the Serde version of TestGet200Response since it is missing the @JsonProperty(JSON_PROPERTY_MY_NAME) annotations.
Derserialization using the Jackson versin of TestGet200Response works fine since it has the @JsonProperty(JSON_PROPERTY_MY_NAME) annotations.
Related issues/PRs
Suggest a fix/enhancement
The @JsonProperty(JSON_PROPERTY_MY_NAME) annotations needs to be added also when we are using serializationLibrary micronaut_serde_jackson.
The text was updated successfully, but these errors were encountered:
Description
When using serializationLibrary micronaut_serde_jackson the getters and setters in the generated code is missing the @JsonProperty annotation that is used for serializationLibrary jackson.
If fields in a JSON document does not use camel case notation, then it might not be possible to read the document with the JsonProperty annotation missing. The field myName is then fine, but fields like my_name, MyName, "My Name", "MY_NAME" etc will not work.
openapi-generator version
7.0.1 java-micronaut-client
OpenAPI declaration file content or url
Sample document for generating code:
Command line used for generation
Command-line for generating code with serializationLibrary micronaut_serde_jackson:
Command-line for generating code with serializationLibrary jackson:
Steps to reproduce
Sample test document:
It is not possible to deserialize the test document above using the Serde version of TestGet200Response since it is missing the @JsonProperty(JSON_PROPERTY_MY_NAME) annotations.
Derserialization using the Jackson versin of TestGet200Response works fine since it has the @JsonProperty(JSON_PROPERTY_MY_NAME) annotations.
Related issues/PRs
Suggest a fix/enhancement
The @JsonProperty(JSON_PROPERTY_MY_NAME) annotations needs to be added also when we are using serializationLibrary micronaut_serde_jackson.
The text was updated successfully, but these errors were encountered: