Skip to content

[V2] feat: support multiple bearer token security tag #2026

@arsensokolov

Description

@arsensokolov

Is your feature request related to a problem? Please describe.
According to the bearer-authentication documentation, Swagger v3.x has this feature. Therefore, I think v2 needs to support it as well.

Describe the solution you'd like
I want to add support for multiple annotations with the possibility of using the token name for specific endpoints in the description.

annotation description parameters example
securitydefinitions.bearerauth Bearer Authentication auth. // @securitydefinitions.bearerauth BearerAuth

Describe alternatives you've considered
There is already an implementation, but it does not provide the ability to declare multiple annotations.

Additional context
The following syntax is used:

// @securitydefinitions.bearerauth BearerAuth1
// @description First bearer token
// @bearerformat JWT

// @securitydefinitions.bearerauth BearerAuth2
// @description Second bearer token
// @bearerformat CustomToken

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions