From 3f177eb4369deaa920cdfe5380fcc1f61e0f5726 Mon Sep 17 00:00:00 2001 From: gr-dv Date: Thu, 12 Oct 2023 15:32:42 +0300 Subject: [PATCH] MSP-2243 update swagger --- docs/swagger.yaml | 118 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 96 insertions(+), 22 deletions(-) diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 8e21ad2..81d9387 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -39,6 +39,15 @@ definitions: userId: type: integer type: object + domain.AuditEvent: + properties: + enabled: + type: boolean + event: + type: string + name: + type: string + type: object domain.AuditResponse: properties: items: @@ -173,10 +182,14 @@ definitions: type: string createdAt: type: string + exclusive: + type: boolean externalGroup: type: string id: type: integer + immutable: + type: boolean name: type: string permissions: @@ -207,6 +220,13 @@ definitions: offset: type: integer type: object + domain.SetAuditEvent: + properties: + enabled: + type: boolean + event: + type: string + type: object domain.UpdateRoleRequest: properties: changeMessage: @@ -397,6 +417,41 @@ paths: 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.PageRequest' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/domain.AuditResponse' + "400": + description: Невалидное тело запроса + schema: + $ref: '#/definitions/domain.GrpcError' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/domain.GrpcError' + summary: Получение списка логов + tags: + - log + /log/events: + post: + consumes: + - application/json + description: Возвращает полный список доступных событий аудита + parameters: - description: Токен администратора in: header name: X-AUTH-ADMIN @@ -414,7 +469,42 @@ paths: "200": description: OK schema: - $ref: '#/definitions/domain.PageRequest' + items: + $ref: '#/definitions/domain.AuditEvent' + type: array + "400": + description: Невалидное тело запроса + schema: + $ref: '#/definitions/domain.GrpcError' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/domain.GrpcError' + summary: Получение списка логов + tags: + - log + /log/set_events: + post: + consumes: + - application/json + description: Всегда возвращает полный список доступных событий аудита + parameters: + - description: Токен администратора + in: header + name: X-AUTH-ADMIN + required: true + type: string + - description: Тело запроса + in: body + name: body + required: true + schema: + $ref: '#/definitions/domain.SetAuditEvent' + produces: + - application/json + responses: + "200": + description: "" "400": description: Невалидное тело запроса schema: @@ -833,33 +923,17 @@ paths: post: consumes: - application/json - description: Получить данные профиля - parameters: - - description: Токен администратора - in: header - name: X-AUTH-ADMIN - required: true - type: string + description: Получить все разрашения produces: - application/json responses: "200": description: OK schema: - $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: Получить профиль + items: + $ref: '#/definitions/domain.Permission' + type: array + summary: Получить все разрашения tags: - user /user/get_users: