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.

@Authorization is not supported in @Api annotation

See original GitHub issue

Hello, After changes which fixes bug https://github.com/springfox/springfox/issues/2194 it is required to add following parameter authorizations = @Authorization(value = "xxx") to @ApiOperation or @Api annotations.

As it is working correctly when placed in @ApiOperation, it is not working with @Api. According to documentation, it should be working with both annotations. Because of it, I’d have to put @ApiOperation to couple dozens of endpoints, instead of on couple of top level interfaces.

This peace of code is only parsing @ApiOperation: springfox.documentation.swagger.readers.operation.OperationAuthReader#apply

Version: 2.9.1

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:3
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
isneezycommented, Jun 25, 2020

Anyone reading this in 2020?

0reactions
stale[bot]commented, Oct 9, 2020

This issue has been automatically closed because it has not had recent activity. Please re-open a new issue if this is still an issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Swagger basic authorization not working with @Api annotation
But when used with @Apioperation it is working fine . I want to apply basic authorization at controller level rather than at method...
Read more >
Authorization of Web Endpoints - Quarkus
The /subject/denied endpoint disallows any access regardless of whether the call is authenticated by specifying the @DenyAll annotation. Please refer to the ...
Read more >
Security Annotations and Authorization in GlassFish ... - Oracle
This article discusses the security annotations defined in JSR 250 and demonstrates how to use them for securing an application with authentication and ......
Read more >
API Keys - Swagger
API Keys. Some APIs use API keys for authorization. An API key is a token that ... The key name ApiKeyAuth is an...
Read more >
Core Services API Reference - Developers | SAS
404, 16304, The annotation was not found for specified annotation ID. ... Annotations. Contains the operations to support annotations.
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