Skip to content

Description for API Key Security Definition. #1030

@pomaretta

Description

@pomaretta

Is your feature request related to a problem? Please describe.
I have a Bearer API Key security definition, due to Swagger 2.0, the user have to type "Bearer TOKEN" into the Authorize option.

Describe the solution you'd like
On the security definition of the API Key, define a description for it.

// @securityDefinitions.apikey Bearer
// @in header
// @name Authorization
// @description "Type 'Bearer TOKEN' to correctly set the API Key"

Describe alternatives you've considered
This cannot be set through the generation. Maybe changing the docs.go to get this feature.

Additional context
I know the tag "// @description" will conflict with the Swagger API description, maybe with "@securityDefinitions.apiKey.description" can solve this conflict.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions