question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Springfox ignores field annotations if spring.jackson.property-naming-strategy is set

See original GitHub issue

The 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

  1. Clone this repo https://github.com/xokker/springfox-namingstrategy-bug
  2. Run mvn spring-boot:run
  3. 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 be some_value, but the result is someValue

Related issues

#2865 looks like the same issue #1436 might be related to the current bug

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:6
  • Comments:7

github_iconTop GitHub Comments

7reactions
durimkryeziucommented, Jun 11, 2019
2reactions
xokkercommented, Feb 14, 2019

@dilipkrish I can try to fix it if you show me where to start digging

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found