2025-07-06 22:29:48 +03:00
|
|
|
|
basePath: /api/v2
|
|
|
|
|
|
definitions:
|
|
|
|
|
|
responses.ErrorResponse400:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
error:
|
|
|
|
|
|
example: Bad Request
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
responses.ErrorResponse401:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
error:
|
|
|
|
|
|
example: Unauthorized
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
responses.ErrorResponse500:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
error:
|
|
|
|
|
|
example: Internal Server Error
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
user.Info:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
created_at:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
email:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
username:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2025-07-07 17:49:34 +03:00
|
|
|
|
user.Login:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
email:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
password:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2025-09-12 23:54:56 +03:00
|
|
|
|
user.LoginResponse:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
access_token:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2025-07-06 22:29:48 +03:00
|
|
|
|
user.Register:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
email:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
password:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
username:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
user.Update:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
email:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
username:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
info:
|
|
|
|
|
|
contact: {}
|
|
|
|
|
|
title: Merch Parser
|
|
|
|
|
|
version: 2.0.0-alpha
|
|
|
|
|
|
paths:
|
|
|
|
|
|
/user:
|
|
|
|
|
|
delete:
|
|
|
|
|
|
description: Помечает пользователя как удаленного по его uuid из токена
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/responses.ErrorResponse400'
|
|
|
|
|
|
"401":
|
|
|
|
|
|
description: Unauthorized
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/responses.ErrorResponse401'
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: Internal Server Error
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/responses.ErrorResponse500'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- BearerAuth: []
|
|
|
|
|
|
summary: Удалить пользователя
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- Users
|
|
|
|
|
|
get:
|
|
|
|
|
|
description: Получает информацию о пользователе по его uuid из токена
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/user.Info'
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/responses.ErrorResponse400'
|
|
|
|
|
|
"401":
|
|
|
|
|
|
description: Unauthorized
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/responses.ErrorResponse401'
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: Internal Server Error
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/responses.ErrorResponse500'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- BearerAuth: []
|
|
|
|
|
|
summary: Получить информацию о пользователе
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- Users
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: Регистрация нового пользователя
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: новый пользователь
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: body
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/user.Register'
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/responses.ErrorResponse400'
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: Internal Server Error
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/responses.ErrorResponse500'
|
|
|
|
|
|
summary: Регистрация нового пользователя
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- Users
|
|
|
|
|
|
put:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: Обновить информацию о пользователе по его uuid из токена
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: изменения
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: body
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/user.Update'
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/responses.ErrorResponse400'
|
|
|
|
|
|
"401":
|
|
|
|
|
|
description: Unauthorized
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/responses.ErrorResponse401'
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: Internal Server Error
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/responses.ErrorResponse500'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- BearerAuth: []
|
|
|
|
|
|
summary: Обновить информацию о пользователе
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- Users
|
2025-09-12 23:54:56 +03:00
|
|
|
|
/user/auth/login:
|
2025-07-07 17:49:34 +03:00
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: Логин
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: логин
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: body
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/user.Login'
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
2025-09-12 23:54:56 +03:00
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/user.LoginResponse'
|
2025-07-07 17:49:34 +03:00
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/responses.ErrorResponse400'
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: Internal Server Error
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/responses.ErrorResponse500'
|
|
|
|
|
|
summary: Логин
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- Users - auth
|
2025-09-12 23:54:56 +03:00
|
|
|
|
/user/auth/logout:
|
2025-07-07 17:49:34 +03:00
|
|
|
|
post:
|
2025-09-12 23:54:56 +03:00
|
|
|
|
description: Логаут. Для логаута надо передать refresh token, он будет инвалидирован.
|
2025-07-07 17:49:34 +03:00
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/responses.ErrorResponse400'
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: Internal Server Error
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/responses.ErrorResponse500'
|
|
|
|
|
|
summary: Логаут
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- Users - auth
|
2025-09-12 23:54:56 +03:00
|
|
|
|
/user/auth/refresh:
|
2025-07-07 17:49:34 +03:00
|
|
|
|
post:
|
2025-09-14 16:23:01 +03:00
|
|
|
|
description: Принимает рефреш токен в http only куки
|
2025-07-07 17:49:34 +03:00
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
2025-09-12 23:54:56 +03:00
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/user.LoginResponse'
|
2025-07-07 17:49:34 +03:00
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/responses.ErrorResponse400'
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: Internal Server Error
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/responses.ErrorResponse500'
|
|
|
|
|
|
summary: Обновление аксесс токена по рефреш токену.
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- Users - auth
|
2025-07-06 22:29:48 +03:00
|
|
|
|
securityDefinitions:
|
|
|
|
|
|
BearerAuth:
|
|
|
|
|
|
description: Введите "Bearer {your_token}" для аутентификации
|
|
|
|
|
|
in: header
|
|
|
|
|
|
name: Authorization
|
|
|
|
|
|
type: apiKey
|
|
|
|
|
|
swagger: "2.0"
|