MSP-3427 swagger refreshed

This commit is contained in:
Tim committed 2024-06-13 17:51:07 +03:00
1 parent 1f232c4271
commit 753af57524
7 files changed
+3510 -44

No files matched your search

+106 -37
View File
@@ -13,6 +13,8 @@ definitions:
type: string
firstName:
type: string
idleTimeoutMs:
type: integer
lastName:
type: string
permissions:
@@ -25,8 +27,6 @@ definitions:
items:
type: integer
type: array
required:
- email
type: object
domain.Audit:
properties:
@@ -57,6 +57,13 @@ definitions:
totalCount:
type: integer
type: object
domain.ChangePasswordRequest:
properties:
newPassword:
type: string
oldPassword:
type: string
type: object
domain.CreateRoleRequest:
properties:
changeMessage:
@@ -86,9 +93,6 @@ definitions:
items:
type: integer
type: array
required:
- email
- password
type: object
domain.DeleteResponse:
properties:
@@ -103,8 +107,7 @@ definitions:
domain.GrpcError:
properties:
details:
items:
type: object
items: {}
type: array
errorCode:
type: string
@@ -115,8 +118,6 @@ definitions:
properties:
userId:
type: integer
required:
- userId
type: object
domain.IdentitiesRequest:
properties:
@@ -124,8 +125,6 @@ definitions:
items:
type: integer
type: array
required:
- ids
type: object
domain.LoginRequest:
properties:
@@ -133,9 +132,6 @@ definitions:
type: string
password:
type: string
required:
- email
- password
type: object
domain.LoginResponse:
properties:
@@ -150,8 +146,6 @@ definitions:
properties:
authCode:
type: string
required:
- authCode
type: object
domain.PageRequest:
properties:
@@ -159,8 +153,6 @@ definitions:
type: integer
offset:
type: integer
required:
- limit
type: object
domain.Permission:
properties:
@@ -173,8 +165,6 @@ definitions:
properties:
id:
type: integer
required:
- id
type: object
domain.Role:
properties:
@@ -213,6 +203,18 @@ definitions:
errorReason:
type: string
type: object
domain.SecureAuthzRequest:
properties:
adminId:
type: integer
permission:
type: string
type: object
domain.SecureAuthzResponse:
properties:
authorized:
type: boolean
type: object
domain.SessionRequest:
properties:
limit:
@@ -260,8 +262,6 @@ definitions:
items:
type: integer
type: array
required:
- id
type: object
domain.User:
properties:
@@ -400,7 +400,7 @@ paths:
- application/json
responses:
"200":
description: ""
description: OK
"400":
description: Невалидный токен
schema:
@@ -504,7 +504,7 @@ paths:
- application/json
responses:
"200":
description: ""
description: OK
"400":
description: Невалидное тело запроса
schema:
@@ -607,7 +607,7 @@ paths:
- application/json
responses:
"200":
description: ""
description: OK
"400":
description: Невалидное тело запроса
schema:
@@ -664,11 +664,6 @@ paths:
- application/json
description: Проверяет токен и возвращает идентификатор администратора
parameters:
- description: Токен администратора
in: header
name: X-AUTH-ADMIN
required: true
type: string
- description: Тело запроса
in: body
name: body
@@ -689,6 +684,32 @@ paths:
summary: Метод аутентификации токена
tags:
- secure
/secure/authorize:
post:
consumes:
- application/json
description: Проверяет наличие у администратора необходимого разрешения
parameters:
- description: Тело запроса
in: body
name: body
required: true
schema:
$ref: '#/definitions/domain.SecureAuthzRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.SecureAuthzResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/domain.GrpcError'
summary: Метод авторизации для администратора
tags:
- secure
/session/all:
post:
consumes:
@@ -743,7 +764,7 @@ paths:
- application/json
responses:
"200":
description: ""
description: OK
"400":
description: Невалидное тело запроса
schema:
@@ -775,7 +796,7 @@ paths:
- application/json
responses:
"200":
description: ""
description: OK
"400":
description: Невалидное тело запроса
schema:
@@ -787,6 +808,38 @@ paths:
summary: Метод блокировки/разблокировки пользователя
tags:
- user
/user/change_password:
post:
consumes:
- application/json
parameters:
- description: Токен администратора
in: header
name: X-AUTH-ADMIN
required: true
type: string
- description: Тело запроса
in: body
name: body
required: true
schema:
$ref: '#/definitions/domain.ChangePasswordRequest'
produces:
- application/json
responses:
"200":
description: OK
"400":
description: Невалидное тело запроса
schema:
$ref: '#/definitions/domain.GrpcError'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/domain.GrpcError'
summary: Метод изменения пароля пользователя
tags:
- user
/user/create_user:
post:
consumes:
@@ -923,17 +976,33 @@ paths:
post:
consumes:
- application/json
description: Получить все разрашения
description: Получить данные профиля
parameters:
- description: Токен администратора
in: header
name: X-AUTH-ADMIN
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/domain.Permission'
type: array
summary: Получить все разрашения
$ref: '#/definitions/domain.AdminUserShort'
"400":
description: Невалидный токен
schema:
$ref: '#/definitions/domain.GrpcError'
"404":
description: Пользователя не существует
schema:
$ref: '#/definitions/domain.GrpcError'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/domain.GrpcError'
summary: Получить профиль
tags:
- user
/user/get_users: