Closed ankurpshah closed 8 years ago
Hi @ankurpshah , which version of swagger-maven-plugin are you using? Support for @ApiParam#hidden
was added in swagger-maven-plugin 3.1.1-SNAPSHOT.
Currently we are using 3.1.0. Does 3.1.1-SNAPSHOT out ?
To use 3.1.1-SNAPSHOT, you'll have to add this to your pom.xml :
<pluginRepositories>
<pluginRepository>
<id>sonatype-snapshot</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
Currently in our project we are using swagger-maven-plugin for generating swagger.json file. We are using spring mvc. We are using IncomingRequestFilter method parameter for accepting all the query parameters. I had documented all query parameters using @ApiImplicitParams. Now I want to ignore all method parameters generated swagger.json file. So I am annotating all the method parameter with @ApiParam(hidden = true). Currently generated swagger.json still shows all three method parameters with located in body.
e.g.
Original java file with Swagger Annotation is below.
So how can I hide method parameter from generated swagger.json and why current framework is ignoring hidden attribute of @ApiParam for spring mvc based project ? Please guide me. This is blocker in my project.