swagger docs update
This commit is contained in:
parent
06d952c145
commit
f07131264f
3 changed files with 53 additions and 40 deletions
|
|
@ -34,6 +34,11 @@ definitions:
|
|||
password:
|
||||
type: string
|
||||
type: object
|
||||
user.LoginResponse:
|
||||
properties:
|
||||
access_token:
|
||||
type: string
|
||||
type: object
|
||||
user.Register:
|
||||
properties:
|
||||
email:
|
||||
|
|
@ -124,8 +129,6 @@ paths:
|
|||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/responses.ErrorResponse500'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: Регистрация нового пользователя
|
||||
tags:
|
||||
- Users
|
||||
|
|
@ -160,7 +163,7 @@ paths:
|
|||
summary: Обновить информацию о пользователе
|
||||
tags:
|
||||
- Users
|
||||
/user/login:
|
||||
/user/auth/login:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
|
|
@ -175,6 +178,8 @@ paths:
|
|||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/user.LoginResponse'
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
|
|
@ -183,14 +188,12 @@ paths:
|
|||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/responses.ErrorResponse500'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: Логин
|
||||
tags:
|
||||
- Users - auth
|
||||
/user/logout:
|
||||
/user/auth/logout:
|
||||
post:
|
||||
description: Логаут. Uuid юзера будет извлечен из токена.
|
||||
description: Логаут. Для логаута надо передать refresh token, он будет инвалидирован.
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
|
|
@ -207,12 +210,14 @@ paths:
|
|||
summary: Логаут
|
||||
tags:
|
||||
- Users - auth
|
||||
/user/refresh:
|
||||
/user/auth/refresh:
|
||||
post:
|
||||
description: Принимает рефреш токен в заголовке Authorization
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/user.LoginResponse'
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue