ApiIgnore/ApiParam#hidden not work for global paramters
See original GitHub issueversion: 2.5.1-snapshot
there is a header type paramter “Authorization” defined in my Swagger2Configuration.class globalOperationParameters.
parameterList.add(new ParameterBuilder().name("Authorization").description("Bearer Token").modelRef(new ModelRef("string")).parameterType("header").required(false).defaultValue("Bearer Token XXXX").build());
.globalOperationParameters(parameterList)
When i use ApiIgnore in my Controller like this.
@ApiIgnore @RequestHeader String AuthorizationTemp
it work.
But like this:
@ApiIgnore @RequestHeader String Authorization
“Authorization” still here.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Hidden parameter in springdoc-openapi doesn't work
I have annotated parameter in operation like this. parameters = { @Parameter( hidden = true, schema = @Schema(implementation = Boolean.class), ...
Read more >Untitled
Frases de tardes soleadas, Jubail university college jobs! ... paste chicken recipe, Or not song, Op8822, Mcpherson 1973, Orthodox christmas 2014 macedonia, ...
Read more >Untitled
Global cma, Alain cabanne facebook, Pensacola fl downtown library. ... Joystick z axis doesn't work, Don't get upsetti, Fenix tk50 price, Diamonds class ......
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
Thanks for the relpy. And I sensed there might be some misunderstanding here. So, let me make myself more clear. I have a “Authorization” head value, I would let to include in most of my api, so I added “Authorization” as globalOperationParameters. And when I want to exclude “Authorization” in some of the apis, I found “@ApiIgnore @RequestHeader String Authorization” not working as I expected. And I already added ApiIgnore.class to the ignorableTypes in docket as you suggested.
return new Docket(DocumentationType.SWAGGER_2) .ignoredParameterTypes(CurrentUser.class, ApiIgnore.class) .globalOperationParameters(parameterList) .useDefaultResponseMessages(false) .apiInfo(apiInfo()) .select() .apis(RequestHandlerSelectors.basePackage("io.xxxxxx.api.controller")) .paths(PathSelectors.any()) .build();
And I don’t know if it’s a bug, or it’s the correct behavior.any update?