get:
  tags:
    - rbac-grants
  operationId: getListOfGrantsByUuid
  parameters:
    - $ref: 'auth.yaml#/components/parameters/assumedRoles'
    - name: grantedRoleUuid
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: UUID of the granted role.
    - name: granteeSubjectUuid
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: UUID of the subject to who the role was granted.
  responses:
    "200":
      description: OK
      content:
        'application/json':
            schema:
              $ref: 'rbac-grant-schemas.yaml#/components/schemas/RbacGrant'
    "401":
      $ref: 'error-responses.yaml#/components/responses/Unauthorized'
    "403":
      $ref: 'error-responses.yaml#/components/responses/Forbidden'
    "404":
      $ref: 'error-responses.yaml#/components/responses/NotFound'

delete:
    tags:
        - rbac-grants
    operationId: deleteRoleGrantFromSubject
    parameters:
        - $ref: 'auth.yaml#/components/parameters/assumedRoles'
        - name: grantedRoleUuid
          in: path
          required: true
          schema:
              type: string
              format: uuid
          description: UUID of the granted role.
        - name: granteeSubjectUuid
          in: path
          required: true
          schema:
              type: string
              format: uuid
          description: UUID of the subject to which the role was granted.
    responses:
        "204":
            description: No Content
        "401":
            $ref: 'error-responses.yaml#/components/responses/Unauthorized'
        "403":
            $ref: 'error-responses.yaml#/components/responses/Forbidden'
        "404":
            $ref: 'error-responses.yaml#/components/responses/NotFound'
