add docs to gitignore
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -4,4 +4,5 @@ config.yaml
|
|||||||
panic.log
|
panic.log
|
||||||
testdata/
|
testdata/
|
||||||
secret/
|
secret/
|
||||||
data/
|
data/
|
||||||
|
docs/
|
||||||
1106
docs/docs.go
1106
docs/docs.go
File diff suppressed because it is too large
Load Diff
1077
docs/swagger.json
1077
docs/swagger.json
File diff suppressed because it is too large
Load Diff
@@ -1,718 +0,0 @@
|
|||||||
definitions:
|
|
||||||
api_acladmin.ProblemDetails:
|
|
||||||
properties:
|
|
||||||
detail:
|
|
||||||
example: No role with ID 42
|
|
||||||
type: string
|
|
||||||
instance:
|
|
||||||
example: /api/acl/roles/42
|
|
||||||
type: string
|
|
||||||
status:
|
|
||||||
example: 404
|
|
||||||
type: integer
|
|
||||||
title:
|
|
||||||
example: Role not found
|
|
||||||
type: string
|
|
||||||
type:
|
|
||||||
example: https://api.triggerssmith.com/errors/role-not-found
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
api_acladmin.assignResourceToRoleRequest:
|
|
||||||
properties:
|
|
||||||
resourceId:
|
|
||||||
example: 1
|
|
||||||
type: integer
|
|
||||||
type: object
|
|
||||||
api_acladmin.assignRoleToUserRequest:
|
|
||||||
properties:
|
|
||||||
roleId:
|
|
||||||
example: 1
|
|
||||||
type: integer
|
|
||||||
type: object
|
|
||||||
api_acladmin.createResourceRequest:
|
|
||||||
properties:
|
|
||||||
key:
|
|
||||||
example: html.view
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
api_acladmin.createResourceResponse:
|
|
||||||
properties:
|
|
||||||
id:
|
|
||||||
example: 1
|
|
||||||
type: integer
|
|
||||||
key:
|
|
||||||
example: html.view
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
api_acladmin.createRoleRequest:
|
|
||||||
properties:
|
|
||||||
name:
|
|
||||||
example: admin
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
api_acladmin.createRoleResponse:
|
|
||||||
properties:
|
|
||||||
id:
|
|
||||||
example: 1
|
|
||||||
type: integer
|
|
||||||
name:
|
|
||||||
example: admin
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
api_acladmin.getResourceResponse:
|
|
||||||
properties:
|
|
||||||
id:
|
|
||||||
example: 1
|
|
||||||
type: integer
|
|
||||||
key:
|
|
||||||
example: html.view
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
api_acladmin.getRoleResource:
|
|
||||||
properties:
|
|
||||||
id:
|
|
||||||
example: 1
|
|
||||||
type: integer
|
|
||||||
name:
|
|
||||||
example: '*'
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
api_acladmin.getRoleResponse:
|
|
||||||
properties:
|
|
||||||
id:
|
|
||||||
example: 1
|
|
||||||
type: integer
|
|
||||||
name:
|
|
||||||
example: admin
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
api_acladmin.getRoleUser:
|
|
||||||
properties:
|
|
||||||
email:
|
|
||||||
example: admin@triggerssmith.com
|
|
||||||
type: string
|
|
||||||
id:
|
|
||||||
example: 1
|
|
||||||
type: integer
|
|
||||||
username:
|
|
||||||
example: admin
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
api_acladmin.getUserRole:
|
|
||||||
properties:
|
|
||||||
id:
|
|
||||||
example: 1
|
|
||||||
type: integer
|
|
||||||
name:
|
|
||||||
example: '*'
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
api_acladmin.updateResourceRequest:
|
|
||||||
properties:
|
|
||||||
key:
|
|
||||||
example: html.view
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
api_acladmin.updateResourceResponse:
|
|
||||||
properties:
|
|
||||||
id:
|
|
||||||
example: 1
|
|
||||||
type: integer
|
|
||||||
key:
|
|
||||||
example: html.view
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
api_acladmin.updateRoleRequest:
|
|
||||||
properties:
|
|
||||||
name:
|
|
||||||
example: admin
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
api_acladmin.updateRoleResponse:
|
|
||||||
properties:
|
|
||||||
id:
|
|
||||||
example: 1
|
|
||||||
type: integer
|
|
||||||
name:
|
|
||||||
example: admin
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
info:
|
|
||||||
contact: {}
|
|
||||||
paths:
|
|
||||||
/api/acl/resources:
|
|
||||||
get:
|
|
||||||
produces:
|
|
||||||
- application/json
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: OK
|
|
||||||
schema:
|
|
||||||
items:
|
|
||||||
properties:
|
|
||||||
id:
|
|
||||||
example: 1
|
|
||||||
type: integer
|
|
||||||
key:
|
|
||||||
example: html.view
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
type: array
|
|
||||||
"500":
|
|
||||||
description: Internal Server Error
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
|
||||||
summary: Get all resources
|
|
||||||
tags:
|
|
||||||
- acl/resources
|
|
||||||
post:
|
|
||||||
consumes:
|
|
||||||
- application/json
|
|
||||||
parameters:
|
|
||||||
- description: Resource
|
|
||||||
in: body
|
|
||||||
name: request
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.createResourceRequest'
|
|
||||||
produces:
|
|
||||||
- application/json
|
|
||||||
responses:
|
|
||||||
"201":
|
|
||||||
description: Created
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.createResourceResponse'
|
|
||||||
"400":
|
|
||||||
description: Bad Request
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
|
||||||
"409":
|
|
||||||
description: Conflict
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
|
||||||
"500":
|
|
||||||
description: Internal Server Error
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
|
||||||
summary: Create resource
|
|
||||||
tags:
|
|
||||||
- acl/resources
|
|
||||||
/api/acl/resources/{resourceId}:
|
|
||||||
delete:
|
|
||||||
parameters:
|
|
||||||
- description: Resource ID
|
|
||||||
example: 1
|
|
||||||
in: path
|
|
||||||
name: resourceId
|
|
||||||
required: true
|
|
||||||
type: integer
|
|
||||||
produces:
|
|
||||||
- application/json
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: OK
|
|
||||||
"400":
|
|
||||||
description: Bad Request
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
|
||||||
"404":
|
|
||||||
description: Not Found
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
|
||||||
"409":
|
|
||||||
description: Conflict
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
|
||||||
"500":
|
|
||||||
description: Internal Server Error
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
|
||||||
summary: Delete resource
|
|
||||||
tags:
|
|
||||||
- acl/resources
|
|
||||||
get:
|
|
||||||
parameters:
|
|
||||||
- description: Resource ID
|
|
||||||
example: 1
|
|
||||||
in: path
|
|
||||||
name: resourceId
|
|
||||||
required: true
|
|
||||||
type: integer
|
|
||||||
produces:
|
|
||||||
- application/json
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: OK
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.getResourceResponse'
|
|
||||||
"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 resource by ID
|
|
||||||
tags:
|
|
||||||
- acl/resources
|
|
||||||
patch:
|
|
||||||
consumes:
|
|
||||||
- application/json
|
|
||||||
parameters:
|
|
||||||
- description: Resource ID
|
|
||||||
example: 1
|
|
||||||
in: path
|
|
||||||
name: resourceId
|
|
||||||
required: true
|
|
||||||
type: integer
|
|
||||||
- description: Resource
|
|
||||||
in: body
|
|
||||||
name: request
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.updateResourceRequest'
|
|
||||||
produces:
|
|
||||||
- application/json
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: OK
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.updateResourceResponse'
|
|
||||||
"400":
|
|
||||||
description: Bad Request
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
|
||||||
"404":
|
|
||||||
description: Not Found
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
|
||||||
"409":
|
|
||||||
description: Conflict
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
|
||||||
"500":
|
|
||||||
description: Internal Server Error
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
|
||||||
summary: Update resource
|
|
||||||
tags:
|
|
||||||
- acl/resources
|
|
||||||
/api/acl/roles:
|
|
||||||
get:
|
|
||||||
produces:
|
|
||||||
- application/json
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: OK
|
|
||||||
schema:
|
|
||||||
items:
|
|
||||||
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.ProblemDetails'
|
|
||||||
summary: Get all roles
|
|
||||||
tags:
|
|
||||||
- acl/roles
|
|
||||||
post:
|
|
||||||
consumes:
|
|
||||||
- application/json
|
|
||||||
parameters:
|
|
||||||
- description: Role
|
|
||||||
in: body
|
|
||||||
name: request
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.createRoleRequest'
|
|
||||||
produces:
|
|
||||||
- application/json
|
|
||||||
responses:
|
|
||||||
"201":
|
|
||||||
description: Created
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.createRoleResponse'
|
|
||||||
"400":
|
|
||||||
description: Bad Request
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
|
||||||
"409":
|
|
||||||
description: Conflict
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
|
||||||
"500":
|
|
||||||
description: Internal Server Error
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
|
||||||
summary: Create role
|
|
||||||
tags:
|
|
||||||
- acl/roles
|
|
||||||
/api/acl/roles/{roleId}:
|
|
||||||
delete:
|
|
||||||
parameters:
|
|
||||||
- description: Role ID
|
|
||||||
example: 1
|
|
||||||
in: path
|
|
||||||
name: roleId
|
|
||||||
required: true
|
|
||||||
type: integer
|
|
||||||
produces:
|
|
||||||
- application/json
|
|
||||||
responses:
|
|
||||||
"204":
|
|
||||||
description: No Content
|
|
||||||
"400":
|
|
||||||
description: Bad Request
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
|
||||||
"404":
|
|
||||||
description: Not Found
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
|
||||||
"409":
|
|
||||||
description: Conflict
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
|
||||||
"500":
|
|
||||||
description: Internal Server Error
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
|
||||||
summary: Delete role
|
|
||||||
tags:
|
|
||||||
- acl/roles
|
|
||||||
get:
|
|
||||||
parameters:
|
|
||||||
- description: Role ID
|
|
||||||
example: 1
|
|
||||||
in: path
|
|
||||||
name: roleId
|
|
||||||
required: true
|
|
||||||
type: integer
|
|
||||||
produces:
|
|
||||||
- application/json
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: OK
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.getRoleResponse'
|
|
||||||
"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 by ID
|
|
||||||
tags:
|
|
||||||
- acl/roles
|
|
||||||
patch:
|
|
||||||
consumes:
|
|
||||||
- application/json
|
|
||||||
parameters:
|
|
||||||
- description: Role ID
|
|
||||||
example: 1
|
|
||||||
in: path
|
|
||||||
name: roleId
|
|
||||||
required: true
|
|
||||||
type: integer
|
|
||||||
- description: Role
|
|
||||||
in: body
|
|
||||||
name: request
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.updateRoleRequest'
|
|
||||||
produces:
|
|
||||||
- application/json
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: OK
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.updateRoleResponse'
|
|
||||||
"400":
|
|
||||||
description: Bad Request
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
|
||||||
"404":
|
|
||||||
description: Not Found
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
|
||||||
"409":
|
|
||||||
description: Conflict
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
|
||||||
"500":
|
|
||||||
description: Internal Server Error
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
|
||||||
summary: Update role
|
|
||||||
tags:
|
|
||||||
- acl/roles
|
|
||||||
/api/acl/roles/{roleId}/resources:
|
|
||||||
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.getRoleResource'
|
|
||||||
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 resources
|
|
||||||
tags:
|
|
||||||
- acl/roles
|
|
||||||
post:
|
|
||||||
parameters:
|
|
||||||
- description: Role ID
|
|
||||||
example: 1
|
|
||||||
in: path
|
|
||||||
name: roleId
|
|
||||||
required: true
|
|
||||||
type: integer
|
|
||||||
- description: Resource
|
|
||||||
in: body
|
|
||||||
name: request
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.assignResourceToRoleRequest'
|
|
||||||
produces:
|
|
||||||
- application/json
|
|
||||||
responses:
|
|
||||||
"201":
|
|
||||||
description: Created
|
|
||||||
"400":
|
|
||||||
description: Bad Request
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
|
||||||
"404":
|
|
||||||
description: Not Found
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
|
||||||
"409":
|
|
||||||
description: Conflict
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
|
||||||
"500":
|
|
||||||
description: Internal Server Error
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
|
||||||
summary: Assign resource to role
|
|
||||||
tags:
|
|
||||||
- acl/roles
|
|
||||||
/api/acl/roles/{roleId}/resources/{resId}:
|
|
||||||
delete:
|
|
||||||
parameters:
|
|
||||||
- description: Role ID
|
|
||||||
example: 1
|
|
||||||
in: path
|
|
||||||
name: roleId
|
|
||||||
required: true
|
|
||||||
type: integer
|
|
||||||
- description: Resource ID
|
|
||||||
example: 1
|
|
||||||
in: path
|
|
||||||
name: resId
|
|
||||||
required: true
|
|
||||||
type: integer
|
|
||||||
produces:
|
|
||||||
- application/json
|
|
||||||
responses:
|
|
||||||
"204":
|
|
||||||
description: No Content
|
|
||||||
"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: Remove resource from role
|
|
||||||
tags:
|
|
||||||
- acl/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:
|
|
||||||
- acl/roles
|
|
||||||
/api/acl/users/{userId}/roles:
|
|
||||||
get:
|
|
||||||
parameters:
|
|
||||||
- description: User ID
|
|
||||||
example: 1
|
|
||||||
in: path
|
|
||||||
name: userId
|
|
||||||
required: true
|
|
||||||
type: integer
|
|
||||||
produces:
|
|
||||||
- application/json
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: OK
|
|
||||||
schema:
|
|
||||||
items:
|
|
||||||
$ref: '#/definitions/api_acladmin.getUserRole'
|
|
||||||
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 user roles by user ID
|
|
||||||
tags:
|
|
||||||
- acl/users
|
|
||||||
post:
|
|
||||||
parameters:
|
|
||||||
- description: User ID
|
|
||||||
example: 1
|
|
||||||
in: path
|
|
||||||
name: userId
|
|
||||||
required: true
|
|
||||||
type: integer
|
|
||||||
- description: Role ID
|
|
||||||
in: body
|
|
||||||
name: body
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.assignRoleToUserRequest'
|
|
||||||
produces:
|
|
||||||
- application/json
|
|
||||||
responses:
|
|
||||||
"201":
|
|
||||||
description: Created
|
|
||||||
"400":
|
|
||||||
description: Bad Request
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
|
||||||
"404":
|
|
||||||
description: Not Found
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
|
||||||
"409":
|
|
||||||
description: Conflict
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
|
||||||
"500":
|
|
||||||
description: Internal Server Error
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/api_acladmin.ProblemDetails'
|
|
||||||
summary: Assign role to user
|
|
||||||
tags:
|
|
||||||
- acl/users
|
|
||||||
/api/acl/users/{userId}/roles/{roleId}:
|
|
||||||
delete:
|
|
||||||
parameters:
|
|
||||||
- description: User ID
|
|
||||||
example: 1
|
|
||||||
in: path
|
|
||||||
name: userId
|
|
||||||
required: true
|
|
||||||
type: integer
|
|
||||||
- description: Role ID
|
|
||||||
example: 1
|
|
||||||
in: path
|
|
||||||
name: roleId
|
|
||||||
required: true
|
|
||||||
type: integer
|
|
||||||
produces:
|
|
||||||
- application/json
|
|
||||||
responses:
|
|
||||||
"204":
|
|
||||||
description: No Content
|
|
||||||
"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: Remove role from user
|
|
||||||
tags:
|
|
||||||
- acl/users
|
|
||||||
swagger: "2.0"
|
|
||||||
Reference in New Issue
Block a user