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.

@ApiParam does not show example value

See original GitHub issue

I 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 screen shot 2016-09-22 at 10 36 49 am

Any help is appreciated.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:18 (4 by maintainers)

github_iconTop GitHub Comments

14reactions
jrauschenbuschcommented, Feb 23, 2018

Why this issue was closed? Imho the issue still exists.

11reactions
JessieGitcommented, Jun 29, 2017

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!

Read more comments on GitHub >

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

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