@ApiParam(example="..") doesn't work for @RequestBody
See original GitHub issueHi!
@ApiParam(example="..") doesn’t work for @RequestBody.
For example, in such case “message” is not rendered in Swagger UI.
    @PostMapping(path = "/simple")
    String simple(@ApiParam(example = "message") @RequestBody String body) {
        return body;
    }
I’ve already investigated the problem, will submit a PR soon. Thanks
Issue Analytics
- State:
- Created 5 years ago
- Comments:9
 Top Results From Across the Web
Top Results From Across the Web
Spring Boot + Swagger + Swagger UI and @RequestBody ...
You could work around it by not using @ApiImplicitParams , but by annoting your method parameter itself with the @ApiParam annotation:
Read more >Swagger @ApiParam vs @ApiModelProperty - Baeldung
The @ApiModelProperty annotation allows us to control Swagger-specific definitions such as description (value), name, data type, example values, ...
Read more >Adding Examples - Swagger
An example illustrates what the value is supposed to be. A default value is what the server uses if the client does not...
Read more >Building requests | Postman Learning Center
For example, if you're working with an API for a To Do list ... If your request doesn't require body data, auth, or...
Read more >Springfox Reference Documentation - GitHub Pages
Downloading the source archive and building will NOT work! 1.4.1. Pre-Commit Build. Code quality (code coverage, checkstyle).
Read more > Top Related Medium Post
Top Related Medium Post
No results found
 Top Related StackOverflow Question
Top Related StackOverflow Question
No results found
 Troubleshoot Live Code
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
Top Related Reddit Thread
No results found
 Top Related Hackernoon Post
Top Related Hackernoon Post
No results found
 Top Related Tweet
Top Related Tweet
No results found
 Top Related Dev.to Post
Top Related Dev.to Post
No results found
 Top Related Hashnode Post
Top Related Hashnode Post
No results found

I have the same problem, in the swagger ui it doesn’t work, but in the editor I see the example. Is anything wrong with my configuration?
same problem here