Merge pull request #24 from sailpoint-oss/nerocket-119-add-permission-docs

[NEROCKET-119] add api docs for nerm create permissions
This commit is contained in:
Corey Votta
2023-08-24 10:06:16 -04:00
committed by GitHub
6 changed files with 89 additions and 1 deletions

View File

@@ -37,6 +37,9 @@ paths:
$ref: "./paths/role.yaml"
/roles/{id}:
$ref: "./paths/roles_id.yaml"
# Permissions
/permissions:
$ref: "./paths/permissions.yaml"
# User Roles
/user_role:
$ref: "./paths/user_role.yaml"
@@ -206,4 +209,4 @@ components:
bearerAuth:
type: http
scheme: bearer
bearerFormat: Token token=your token
bearerFormat: Token token=your token

View File

@@ -0,0 +1,15 @@
post:
summary: Create a permission
description: This endpoint can create permissions for Lifecycle, Consolidation, and Collaboration
operationId: createPermission
tags:
- permissions
requestBody:
$ref: "../requestBodies/POST/Permissions.yaml"
responses:
'200':
$ref: "../responses/Permission.yaml"
'400':
$ref: "../responses/400.yaml"
'500':
$ref: "../responses/500.yaml"

View File

@@ -0,0 +1,9 @@
required: true
content:
application/json:
schema:
type: object
properties:
permission:
type: object
$ref: "../../schemas/POST/Permission.yaml"

View File

@@ -0,0 +1,9 @@
description: Expected response to a valid request
content:
application/json:
schema:
type: object
properties:
permission:
type: object
$ref: '../schemas/GET/Permission.yaml'

View File

@@ -0,0 +1,28 @@
type: object
properties:
id:
type: string
format: uuid
readOnly: true
description: The id of the permission
example: 2e06b876-f456-473d-bd65-b6435e0b6b2d
role_id:
type: string
format: uuid
description: The id of the role
example: ef5d413f-ba18-49e6-9a72-bb115aa133ff
value:
type: integer
format: int32
example: 1
description: The permissions level of access
subject:
type: integer
format: int32
example: 1
description: The type of permission
subject_id:
type: string
format: uuid
example: db3d85ef-c324-458b-b206-58debaa96419
description: The ID of the object that the permission is giving access to

View File

@@ -0,0 +1,24 @@
type: object
properties:
role_id:
type: string
format: uuid
description: The id of the role
example: ef5d413f-ba18-49e6-9a72-bb115aa133ff
subject_id:
type: string
format: uuid
example: db3d85ef-c324-458b-b206-58debaa96419
description: The ID of the object that the permission is giving access to
value:
type: integer
format: int32
enum: [1, 2, 3, 4, 5, 6, 7]
example: 1
description: The permissions level of access
subject:
type: integer
format: int32
enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23]
example: 0
description: The type of permission