@ApiParam does not show example value
See original GitHub issueI am trying to setup swagger for my rest api
In response when I mention custom response type in ApiResponse Like
@ApiResponse(code = 200, message = "Success", response = Entity.class)
I am getting example output, but when I do
@ApiParam(value = "start year", required = true, name = "startYear")Entity startYear,
I don’t get sample input body.
And it shows

Any help is appreciated.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:18 (4 by maintainers)
Top Results From Across the Web
Swagger @ApiParam vs @ApiModelProperty - Baeldung
The @ApiParam annotation helps to specify the name, type, description (value), and example value of the parameter. Moreover, we can specify ...
Read more >ApiParam is not working with springfox swagger 2
0 and (@ApiOperation) is working fine and the annotation doesn't shown as deprecated they are shown normally,only (@apiparam) doesn't give the ...
Read more >Swagger UI. Example value is not set by @Example o...
It seems it is still a problem. Here is my screen shot. ... Example value is not set by @Example or @ApiParam tags...
Read more >ApiParam (swagger-annotations 1.5.12 API)
Specifies whether the parameter can accept multiple values by having ... a single example for non-body type parameters ... See io.swagger.core.filter.
Read more >Guide - 7.10.12.2 Migrating to OpenApi 3.0 and Swagger 2.X ...
@APIResponse, @ApiResponse, See below for usage; ApiResponse.responseCode is a String now (not int). @ApiParam(value = "...", example = ".
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

Why this issue was closed? Imho the issue still exists.
I have the same problem. I am using Swagger-annotations 1.5.10. I want to show the example input for the API as below. @ApiParam(value = “Input for get canonical names service”, required = true, examples = @Example(@ExampleProperty(value = "{\r\n"inputs": [{\r\n\t"entityType": "type0",\r\n\t"token": "flower"\r\n}]\r\n}))) Actually, no matter the example is what, there is no example shown in UI. But, all other attributes, e.g., value, required are displayed correctly. The only problem is the example. Is there any potential package conflicting with exampleproperty? Any help will be appreciated!