swagger docs update
This commit is contained in:
parent
28da81ea59
commit
51ee003b24
3 changed files with 309 additions and 0 deletions
|
|
@ -27,6 +27,13 @@ definitions:
|
|||
username:
|
||||
type: string
|
||||
type: object
|
||||
user.Login:
|
||||
properties:
|
||||
email:
|
||||
type: string
|
||||
password:
|
||||
type: string
|
||||
type: object
|
||||
user.Register:
|
||||
properties:
|
||||
email:
|
||||
|
|
@ -153,6 +160,72 @@ paths:
|
|||
summary: Обновить информацию о пользователе
|
||||
tags:
|
||||
- Users
|
||||
/user/login:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Логин
|
||||
parameters:
|
||||
- description: логин
|
||||
in: body
|
||||
name: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/user.Login'
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/responses.ErrorResponse400'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/responses.ErrorResponse500'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: Логин
|
||||
tags:
|
||||
- Users - auth
|
||||
/user/logout:
|
||||
post:
|
||||
description: Логаут. Uuid юзера будет извлечен из токена.
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/responses.ErrorResponse400'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/responses.ErrorResponse500'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: Логаут
|
||||
tags:
|
||||
- Users - auth
|
||||
/user/refresh:
|
||||
post:
|
||||
description: Принимает рефреш токен в заголовке Authorization
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/responses.ErrorResponse400'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/responses.ErrorResponse500'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: Обновление аксесс токена по рефреш токену.
|
||||
tags:
|
||||
- Users - auth
|
||||
securityDefinitions:
|
||||
BearerAuth:
|
||||
description: Введите "Bearer {your_token}" для аутентификации
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue