Springfox ignores field annotations if spring.jackson.property-naming-strategy is set
See original GitHub issueThe bug
If the property spring.jackson.property-naming-strategy
is defined inside a spring boot application, field annotations @JsonProperty("<new-name>")
, @ApiModelProperty("<new-name>")
, @ApiParam("<new-name>")
are ignored by the springfox.
How to reproduce
- Clone this repo https://github.com/xokker/springfox-namingstrategy-bug
- Run
mvn spring-boot:run
- Open
http://localhost:8080/swagger-ui.html
in the browser and try to make a request to/bug
endpoint – the model says the name of the field should besome_value
, but the result issomeValue
Related issues
#2865 looks like the same issue #1436 might be related to the current bug
Issue Analytics
- State:
- Created 5 years ago
- Reactions:6
- Comments:7
Top Results From Across the Web
Jackson is ignoring spring.jackson.properties in my spring ...
I had @EnableWebMvc annotation in one of the classes (ExceptionHandler) in my Application (face-palm!). But, as per this issue,.
Read more >Springfox Reference Documentation - GitHub Pages
Springfox works by examining an application, once, at runtime to infer API semantics based on spring configurations, class structure and various ...
Read more >docs/release-notes.md · serv/springfox - Gitee.com
springfox. /. docs. /. release-notes.md ... (#1436) Explicit value JsonProperty ignored when PropertyNamingStrategy is configured not-reproducable @ ...
Read more >Springfox/Swagger ignores @XmlElement annotation for ...
Add below dependencies into your pom.xml dependencies section. <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-annotations</ ...
Read more >Springfox Reference Documentation - 沧海一滴 - 博客园
Introduction The Springfox suite of java libraries are all about ... For e.g. the jackson annotations should always trump or have more ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It’s happening the same here: https://github.com/durimkryeziu/demo-json-property-is-ignored
@dilipkrish I can try to fix it if you show me where to start digging