Skip to content

Conversation

@Drowze
Copy link

@Drowze Drowze commented Jun 16, 2025

Description:

Add OperationPermissions component, which should take x-user-permissions OpenAPI extension and render it nicely.

Also did a slight update on the Operation component, to:

  • remove permissions from the main extensions object
  • render OperationPermissions right below the operation description

Demo:

  •  "/pet/{petId}": {
       "get": {
         "x-user-permissions": [
           { "name": "view_pets", "details": "Controls access to current user's pets page" },
           { "name": "view_all_pets", "details": "Controls access any user's pets" },
           { "name": "manage_pets" }
         ],
         // ...
    Kapture 2025-06-16 at 15 52 35
  • // when no x-user-permissions was defined
    Screenshot 2025-06-16 at 15 57 21
  • Notice x-user-permissions is not displayed under extensions (when showExtensions is set to true):
    Screenshot 2025-06-16 at 15 59 26

@Drowze Drowze marked this pull request as ready for review June 16, 2025 18:41
@Drowze Drowze force-pushed the OK-49577-user-permissions-component branch 13 times, most recently from caff69d to 38ef603 Compare June 16, 2025 21:09
@Drowze Drowze force-pushed the OK-49577-user-permissions-component branch from 38ef603 to 14f1fe9 Compare June 16, 2025 21:36
@Drowze Drowze merged commit ff7e24a into master Jun 16, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants