some changes
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
definitions:
|
||||
api_acladmin.createResourceErrorInvalidResourceKey:
|
||||
api_acladmin.ProblemDetails:
|
||||
properties:
|
||||
details:
|
||||
example: Invalid resource key
|
||||
detail:
|
||||
example: No role with ID 42
|
||||
type: string
|
||||
error:
|
||||
example: FAILED_TO_CREATE_RESOURCE
|
||||
instance:
|
||||
example: /api/acl/roles/42
|
||||
type: string
|
||||
type: object
|
||||
api_acladmin.createResourceErrorResourceAlreadyExists:
|
||||
properties:
|
||||
details:
|
||||
example: Resource with key 'html.view' already exists
|
||||
status:
|
||||
example: 404
|
||||
type: integer
|
||||
title:
|
||||
example: Role not found
|
||||
type: string
|
||||
error:
|
||||
example: FAILED_TO_CREATE_RESOURCE
|
||||
type:
|
||||
example: https://api.triggerssmith.com/errors/role-not-found
|
||||
type: string
|
||||
type: object
|
||||
api_acladmin.createResourceRequest:
|
||||
@@ -32,24 +32,6 @@ definitions:
|
||||
example: html.view
|
||||
type: string
|
||||
type: object
|
||||
api_acladmin.createRoleErrorInvalidRoleName:
|
||||
properties:
|
||||
details:
|
||||
example: Invalid role name
|
||||
type: string
|
||||
error:
|
||||
example: FAILED_TO_CREATE_ROLE
|
||||
type: string
|
||||
type: object
|
||||
api_acladmin.createRoleErrorRoleAlreadyExists:
|
||||
properties:
|
||||
details:
|
||||
example: Role with name 'admin' already exists
|
||||
type: string
|
||||
error:
|
||||
example: FAILED_TO_CREATE_ROLE
|
||||
type: string
|
||||
type: object
|
||||
api_acladmin.createRoleRequest:
|
||||
properties:
|
||||
name:
|
||||
@@ -65,94 +47,6 @@ definitions:
|
||||
example: admin
|
||||
type: string
|
||||
type: object
|
||||
api_acladmin.deleteResourceErrorInvalidResourceID:
|
||||
properties:
|
||||
details:
|
||||
example: Resource ID must be positive integer
|
||||
type: string
|
||||
error:
|
||||
example: INVALID_RESOURCE_ID
|
||||
type: string
|
||||
type: object
|
||||
api_acladmin.deleteResourceErrorResourceInUse:
|
||||
properties:
|
||||
details:
|
||||
example: Resource with ID 123 is used and cannot be deleted
|
||||
type: string
|
||||
error:
|
||||
example: FAILED_TO_DELETE_RESOURCE
|
||||
type: string
|
||||
type: object
|
||||
api_acladmin.deleteResourceErrorResourceNotFound:
|
||||
properties:
|
||||
details:
|
||||
example: No resource with ID 123
|
||||
type: string
|
||||
error:
|
||||
example: RESOURCE_NOT_FOUND
|
||||
type: string
|
||||
type: object
|
||||
api_acladmin.deleteRoleErrorInvalidRoleID:
|
||||
properties:
|
||||
details:
|
||||
example: Role ID must be positive integer
|
||||
type: string
|
||||
error:
|
||||
example: INVALID_ROLE_ID
|
||||
type: string
|
||||
type: object
|
||||
api_acladmin.deleteRoleErrorRoleInUse:
|
||||
properties:
|
||||
details:
|
||||
example: Role with ID 123 is assigned to users and cannot be deleted
|
||||
type: string
|
||||
error:
|
||||
example: FAILED_TO_DELETE_ROLE
|
||||
type: string
|
||||
type: object
|
||||
api_acladmin.deleteRoleErrorRoleNotFound:
|
||||
properties:
|
||||
details:
|
||||
example: No role with ID 123
|
||||
type: string
|
||||
error:
|
||||
example: ROLE_NOT_FOUND
|
||||
type: string
|
||||
type: object
|
||||
api_acladmin.errorInternalServerError:
|
||||
properties:
|
||||
details:
|
||||
type: string
|
||||
error:
|
||||
type: string
|
||||
type: object
|
||||
api_acladmin.errorInvalidRequestBody:
|
||||
properties:
|
||||
details:
|
||||
example: Request body is not valid JSON
|
||||
type: string
|
||||
error:
|
||||
example: INVALID_REQUEST_BODY
|
||||
type: string
|
||||
type: object
|
||||
api_acladmin.getResourceErrorInvalidResourceID:
|
||||
properties:
|
||||
details:
|
||||
example: Resource ID must be positive integer
|
||||
type: string
|
||||
error:
|
||||
example: INVALID_RESOURCE_ID
|
||||
type: string
|
||||
type: object
|
||||
api_acladmin.getResourceErrorResourceNotFound:
|
||||
properties:
|
||||
details:
|
||||
example: No resource with ID 123
|
||||
type: string
|
||||
error:
|
||||
example: RESOURCE_NOT_FOUND
|
||||
type: string
|
||||
type: object
|
||||
api_acladmin.getResourceResponse:
|
||||
properties:
|
||||
id:
|
||||
@@ -162,24 +56,6 @@ definitions:
|
||||
example: html.view
|
||||
type: string
|
||||
type: object
|
||||
api_acladmin.getRoleErrorInvalidRoleID:
|
||||
properties:
|
||||
details:
|
||||
example: Role ID must be positive integer
|
||||
type: string
|
||||
error:
|
||||
example: INVALID_ROLE_ID
|
||||
type: string
|
||||
type: object
|
||||
api_acladmin.getRoleErrorRoleNotFound:
|
||||
properties:
|
||||
details:
|
||||
example: No role with ID 123
|
||||
type: string
|
||||
error:
|
||||
example: ROLE_NOT_FOUND
|
||||
type: string
|
||||
type: object
|
||||
api_acladmin.getRoleResponse:
|
||||
properties:
|
||||
id:
|
||||
@@ -189,40 +65,16 @@ definitions:
|
||||
example: admin
|
||||
type: string
|
||||
type: object
|
||||
api_acladmin.updateResourceErrorInvalidResourceID:
|
||||
api_acladmin.getRoleUser:
|
||||
properties:
|
||||
details:
|
||||
example: Resource ID must be positive integer
|
||||
userEmail:
|
||||
example: admin@triggerssmith.com
|
||||
type: string
|
||||
error:
|
||||
example: INVALID_RESOURCE_ID
|
||||
type: string
|
||||
type: object
|
||||
api_acladmin.updateResourceErrorInvalidResourceKey:
|
||||
properties:
|
||||
details:
|
||||
example: Invalid resource key
|
||||
type: string
|
||||
error:
|
||||
example: FAILED_TO_UPDATE_RESOURCE
|
||||
type: string
|
||||
type: object
|
||||
api_acladmin.updateResourceErrorResourceKeyAlreadyExists:
|
||||
properties:
|
||||
details:
|
||||
example: Resource with key 'html.view' already exists
|
||||
type: string
|
||||
error:
|
||||
example: FAILED_TO_UPDATE_RESOURCE
|
||||
type: string
|
||||
type: object
|
||||
api_acladmin.updateResourceErrorResourceNotFound:
|
||||
properties:
|
||||
details:
|
||||
example: No resource with ID 123
|
||||
type: string
|
||||
error:
|
||||
example: RESOURCE_NOT_FOUND
|
||||
userId:
|
||||
example: 1
|
||||
type: integer
|
||||
userName:
|
||||
example: admin
|
||||
type: string
|
||||
type: object
|
||||
api_acladmin.updateResourceRequest:
|
||||
@@ -240,42 +92,6 @@ definitions:
|
||||
example: html.view
|
||||
type: string
|
||||
type: object
|
||||
api_acladmin.updateRoleErrorInvalidRoleID:
|
||||
properties:
|
||||
details:
|
||||
example: Role ID must be positive integer
|
||||
type: string
|
||||
error:
|
||||
example: INVALID_ROLE_ID
|
||||
type: string
|
||||
type: object
|
||||
api_acladmin.updateRoleErrorInvalidRoleName:
|
||||
properties:
|
||||
details:
|
||||
example: Invalid role name
|
||||
type: string
|
||||
error:
|
||||
example: FAILED_TO_UPDATE_ROLE
|
||||
type: string
|
||||
type: object
|
||||
api_acladmin.updateRoleErrorRoleNameAlreadyExists:
|
||||
properties:
|
||||
details:
|
||||
example: Role with name 'admin' already exists
|
||||
type: string
|
||||
error:
|
||||
example: FAILED_TO_UPDATE_ROLE
|
||||
type: string
|
||||
type: object
|
||||
api_acladmin.updateRoleErrorRoleNotFound:
|
||||
properties:
|
||||
details:
|
||||
example: No role with ID 123
|
||||
type: string
|
||||
error:
|
||||
example: ROLE_NOT_FOUND
|
||||
type: string
|
||||
type: object
|
||||
api_acladmin.updateRoleRequest:
|
||||
properties:
|
||||
name:
|
||||
@@ -303,19 +119,21 @@ paths:
|
||||
description: OK
|
||||
schema:
|
||||
items:
|
||||
properties:
|
||||
id:
|
||||
example: 1
|
||||
type: integer
|
||||
key:
|
||||
example: html.view
|
||||
type: string
|
||||
type: object
|
||||
items:
|
||||
properties:
|
||||
id:
|
||||
example: 1
|
||||
type: integer
|
||||
key:
|
||||
example: html.view
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
type: array
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/api_acladmin.errorInternalServerError'
|
||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
||||
summary: Get all resources
|
||||
tags:
|
||||
- resources
|
||||
@@ -339,15 +157,15 @@ paths:
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/api_acladmin.createResourceErrorInvalidResourceKey'
|
||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
||||
"409":
|
||||
description: Conflict
|
||||
schema:
|
||||
$ref: '#/definitions/api_acladmin.createResourceErrorResourceAlreadyExists'
|
||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/api_acladmin.errorInternalServerError'
|
||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
||||
summary: Create resource
|
||||
tags:
|
||||
- resources
|
||||
@@ -368,19 +186,19 @@ paths:
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/api_acladmin.deleteResourceErrorInvalidResourceID'
|
||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/api_acladmin.deleteResourceErrorResourceNotFound'
|
||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
||||
"409":
|
||||
description: Conflict
|
||||
schema:
|
||||
$ref: '#/definitions/api_acladmin.deleteResourceErrorResourceInUse'
|
||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/api_acladmin.errorInternalServerError'
|
||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
||||
summary: Delete resource
|
||||
tags:
|
||||
- resources
|
||||
@@ -402,15 +220,15 @@ paths:
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/api_acladmin.getResourceErrorInvalidResourceID'
|
||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/api_acladmin.getResourceErrorResourceNotFound'
|
||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/api_acladmin.errorInternalServerError'
|
||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
||||
summary: Get resource by ID
|
||||
tags:
|
||||
- resources
|
||||
@@ -440,19 +258,19 @@ paths:
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/api_acladmin.updateResourceErrorInvalidResourceKey'
|
||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/api_acladmin.updateResourceErrorResourceNotFound'
|
||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
||||
"409":
|
||||
description: Conflict
|
||||
schema:
|
||||
$ref: '#/definitions/api_acladmin.updateResourceErrorResourceKeyAlreadyExists'
|
||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/api_acladmin.errorInternalServerError'
|
||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
||||
summary: Update resource
|
||||
tags:
|
||||
- resources
|
||||
@@ -465,19 +283,21 @@ paths:
|
||||
description: OK
|
||||
schema:
|
||||
items:
|
||||
properties:
|
||||
id:
|
||||
example: 1
|
||||
type: integer
|
||||
name:
|
||||
example: admin
|
||||
type: string
|
||||
type: object
|
||||
items:
|
||||
properties:
|
||||
id:
|
||||
example: 1
|
||||
type: integer
|
||||
name:
|
||||
example: admin
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
type: array
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/api_acladmin.errorInternalServerError'
|
||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
||||
summary: Get all roles
|
||||
tags:
|
||||
- roles
|
||||
@@ -501,19 +321,15 @@ paths:
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/api_acladmin.errorInvalidRequestBody'
|
||||
"401":
|
||||
description: Unauthorized
|
||||
schema:
|
||||
$ref: '#/definitions/api_acladmin.createRoleErrorInvalidRoleName'
|
||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
||||
"409":
|
||||
description: Conflict
|
||||
schema:
|
||||
$ref: '#/definitions/api_acladmin.createRoleErrorRoleAlreadyExists'
|
||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/api_acladmin.errorInternalServerError'
|
||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
||||
summary: Create role
|
||||
tags:
|
||||
- roles
|
||||
@@ -534,19 +350,19 @@ paths:
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/api_acladmin.deleteRoleErrorInvalidRoleID'
|
||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/api_acladmin.deleteRoleErrorRoleNotFound'
|
||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
||||
"409":
|
||||
description: Conflict
|
||||
schema:
|
||||
$ref: '#/definitions/api_acladmin.deleteRoleErrorRoleInUse'
|
||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/api_acladmin.errorInternalServerError'
|
||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
||||
summary: Delete role
|
||||
tags:
|
||||
- roles
|
||||
@@ -568,15 +384,15 @@ paths:
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/api_acladmin.getRoleErrorInvalidRoleID'
|
||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/api_acladmin.getRoleErrorRoleNotFound'
|
||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/api_acladmin.errorInternalServerError'
|
||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
||||
summary: Get role by ID
|
||||
tags:
|
||||
- roles
|
||||
@@ -606,20 +422,55 @@ paths:
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/api_acladmin.updateRoleErrorInvalidRoleName'
|
||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/api_acladmin.updateRoleErrorRoleNotFound'
|
||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
||||
"409":
|
||||
description: Conflict
|
||||
schema:
|
||||
$ref: '#/definitions/api_acladmin.updateRoleErrorRoleNameAlreadyExists'
|
||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/api_acladmin.errorInternalServerError'
|
||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
||||
summary: Update role
|
||||
tags:
|
||||
- roles
|
||||
/api/acl/roles/{roleId}/users:
|
||||
get:
|
||||
parameters:
|
||||
- description: Role ID
|
||||
example: 1
|
||||
in: path
|
||||
name: roleId
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
items:
|
||||
items:
|
||||
$ref: '#/definitions/api_acladmin.getRoleUser'
|
||||
type: array
|
||||
type: array
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
||||
summary: Get role users
|
||||
tags:
|
||||
- roles
|
||||
swagger: "2.0"
|
||||
|
||||
Reference in New Issue
Block a user