- Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
Milestone
Description
I'm curious about getting "x-example" in the json output using annotations in Spring REST controllers.
Currently, I'm attempting this in my controller:
@Override public ResponseEntity<Object> update( @RequestBody @Valid UpdateCampaignRequest updateCampaignRequest, @ApiParam(name = "campaign_id", example = "1", required = true) @PathVariable("campaign_id") Long campaignId) { ... } ...in the method parameters of the rest controller method signature.
This however, produces no x-example in the swagger json output (converted to yml by me):
parameters: - name: campaign_id in: path description: campaign_id required: true type: integer format: int64 Is there another way to accomplish this?
These are my dependencies:
<dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> <version>2.8.0</version> </dependency> <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger-ui</artifactId> <version>2.8.0</version> </dependency>