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.

ApiIgnore/ApiParam#hidden not work for global paramters

See original GitHub issue

version: 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:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
steventongcommented, Aug 23, 2016

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.

0reactions
wzw1990commented, Nov 15, 2019

any update?

Read more comments on GitHub >

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

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