Skip to content

[OpenAPI] Shared Components in the @auth tag #122

@rsamoilov

Description

@rsamoilov

Description

Currently, Rage supports specifying security schemes for an application using the @auth tag.

The tag supports two forms:

  • using the default scheme:
# @auth authenticate_user
  • using a custom scheme inlined into the tag:
# @auth authenticate_by_token
#   type: apiKey
#   in: header
#   name: X-API-Key

Unless it is something really simple and straightforward, we recommend avoiding inlining YAML into tags. Thus, it makes sense to update the @auth tag to accept a shared reference. For example:

# @auth authenticate_by_token #/components/securitySchemes/ApiKeyAuth

Such tag would apply the ApiKeyAuth security scheme to all necessary controller actions.

Tips

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions