did anyone succeed to hide a parameter from generated documentation? I found an issue here, but using @ApiParam(access="internal", required=false)
before @HeaderParam
did not seem to work.
相关问题
- Unusual use of the new keyword
- Design RESTful service with multiple ids
- How to refer to an external JSON file containing r
- Axios OPTIONS instead of POST Request. Express Res
- Plain (non-HTML) error pages in REST api
相关文章
- Gatling拓展插件开发,check(bodyString.saveAs("key"))怎么实现
- swagger3.0,版本的接口都没有了
- RDF libraries for Scala [closed]
- Why is my Dispatching on Actors scaled down in Akk
- How do you run cucumber with Scala 2.11 and sbt 0.
- GRPC: make high-throughput client in Java/Scala
- Got ActiveRecord::AssociationTypeMismatch on model
- Multiple parameters in AngularJS $resource GET
This answer describes the current solution in springfox using
.ignoredParameterTypes
or@ApiIgnore
Ok, looking at the unit tests helped. First you need to define a filter:
And then enable it in
web.xml
With swagger-springmvc (https://github.com/springfox/springfox) at the moment there's no way to use SwaggerSpecFilter. But it respects @ApiIgnore annotation - it can be applied to method parameter which shouldn't appear in generated metadata.
Hope this helps.
For Fields
For Apis
For Parameters
In
sprigfox-swagger2
implementation there is an annotation@ApiModelProperty
that does this.Example:
Annotation
@ApiParam(hidden = true)
resolved issue for me.