-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support JSON-B @JsonbProperty in generated documentation #2789
Comments
Is there a workaround for that, I also have the same problem. |
Hi, public static final String JSON_ATTRIBUTE_ID = "_id";
...
@Schema(name = JSON_ATTRIBUTE_ID)
@JsonbProperty(JSON_ATTRIBUTE_ID)
private Long id; Other solution I found was to use Jackson annotations instead of JSON-B annotations. The JAX-RS implementation I work with (RESTEasy in Wildfly) can use Jackson annotations for JSON serialization/deserialization out-of-the-box (without any configuration needed). |
+1 for Swagger to read @JsonbProperty |
I am using swagger plugin to generate classes from api spec (yaml) file. The generated model classes contains Jackson annotations. I would like to have JSON-B annotations instead of Jackson annotations. How this can be achieved? |
+1 for Swagger to read @JsonbProperty |
The JSON-B annotation
javax.json.bind.annotation.JsonbProperty
can be used to set a different property name for a JSON property much like the jackson annotationcom.fasterxml.jackson.annotation.JsonProperty
can.When using the jackson annotation the name is automatically used in the generated swagger documentation.
The generated documentation should also reflect the property name set with the JSON-B annotation.
The text was updated successfully, but these errors were encountered: