Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Display security scheme roles #2491

Open
JeroenVanOort opened this issue Jan 3, 2024 · 0 comments
Open

Feature Request: Display security scheme roles #2491

JeroenVanOort opened this issue Jan 3, 2024 · 0 comments
Labels
enhancement New feature or request triaged

Comments

@JeroenVanOort
Copy link

It would be helpful to show security scheme roles. According to the specs roles are required for oauth and openIdConnect types, but they can be defined for other scheme types too.

Context

This is a curated OpenAPI spec with an operation that requires the read:tokens role, returning a 403 error if not present. I would like to show this information in the rendered documentation.

paths:
  /tokens:
    get:
      responses:
        200:
          description: A list of tokens.
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
      security:
        - bearerAuth: ['read:tokens']
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

Current Behavior

read:tokens is not shown:

image

Expected Behavior

Something like this:

image

@chohmann chohmann added enhancement New feature or request triaged labels Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triaged
Projects
None yet
Development

No branches or pull requests

2 participants