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
For some names used to define Data types properties in a YAML, the JSON objects that the Java CXF Server expects and/or produces do not match the definition in the YAML.
Swagger-codegen version
2.3.0
Swagger declaration file content or url
For example an attribute defined in the YAML like this:
EX_TYPE:
type: "integer"
Generates the following Java server code:
publicIntegergetEXTYPE() {
This causes that the object corresponds to another JSON representation rather than the one intended.
Intended JSON:
EX_TYPE: 1
Obtained JSON:
EXTYPE: 1
Command line used for generation
..
Steps to reproduce
..
Related issues/PRs
..
Suggest a fix/enhancement
The CXF generation template for Data types could add the JsonProperty anotation to include the real name of the property.
By adding the following line to the pojo.mustache of JavaJaxRS/cxf
@JsonProperty("{{name}}")
The resulting Java code works without the above mentioned issue:
Description
For some names used to define Data types properties in a YAML, the JSON objects that the Java CXF Server expects and/or produces do not match the definition in the YAML.
Swagger-codegen version
2.3.0
Swagger declaration file content or url
For example an attribute defined in the YAML like this:
Generates the following Java server code:
This causes that the object corresponds to another JSON representation rather than the one intended.
Intended JSON:
EX_TYPE: 1
Obtained JSON:
EXTYPE: 1
Command line used for generation
..
Steps to reproduce
..
Related issues/PRs
..
Suggest a fix/enhancement
The CXF generation template for Data types could add the JsonProperty anotation to include the real name of the property.
By adding the following line to the pojo.mustache of JavaJaxRS/cxf
The resulting Java code works without the above mentioned issue:
The text was updated successfully, but these errors were encountered: