@ExampleProperty/value is getting ignored
See original GitHub issueWhat version of the library are you using?
2.9.2
What kind of issue is this?
Bug
Example Repository
https://github.com/napolev/springfox-swagger2-issue
How to recreate the issue
$ git clone https://github.com/napolev/springfox-swagger2-issue
$ cd springfox-swagger2-issue
$ gradle bootRun
Description of the issue
On the repository pointed above there is a very simple project which contains the following file:
/src/main/java/com/example/demo/car/CarController.java
The issue is that the @ExampleProperty / value is getting ignored as you can see on the image below:
Other than that, everything works fine. For example, for the following payload the response is correct:
Issue Analytics
- State:
- Created 4 years ago
- Reactions:13
- Comments:24 (2 by maintainers)
Top Results From Across the Web
Model's Ignored property does not seem to get set using init ...
I am facing an issue where I am unable to set an ignored property through init(value: Any) . The way I understood ignored...
Read more >Code Inspection: Member initialized value ignored - JetBrains
For example, if there are more than one constructor, it enables you to initialize a field with different values.
Read more >Class property types are ignored when passed as an ... - GitHub
Expected behavior: Class property types would be respected when assigning their values whether passed as an object or assigned individually. I'm ...
Read more >Jackson Ignore Properties on Marshalling - Baeldung
This tutorial will show how to ignore certain fields when serializing an object to JSON using Jackson 2.x.
Read more >How to ignore properties with System.Text.Json | Microsoft Learn
To ignore individual properties, use the [JsonIgnore] attribute. The following example shows a type to serialize. It also shows the JSON ...
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
@dilipkrish Any update on this issue? The examples are not working in 2.9.2. For us examples are a must for documentation. Please help!
Bingo! Finally on this commit I was able to find the way to make
Sprinfox Swagger
to auto populate the values on theSwagger UI
:https://github.com/napolev/springfox-swagger2-issue/commit/7e2591d07fc5d8e83282f01bd7e8ce5e2475c761
Here you have a screenshot of it:
Thank you guys for all your help including @indicasta.