elements icon indicating copy to clipboard operation
elements copied to clipboard

Feature Request: Display security scheme roles

Open JeroenVanOort opened this issue 2 years ago • 0 comments

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

JeroenVanOort avatar Jan 03 '24 14:01 JeroenVanOort