This commit is contained in:
nquidox 2026-01-03 15:25:31 +03:00
commit 73b524d203
18 changed files with 1279 additions and 0 deletions

109
docs/swagger.yaml Normal file
View file

@ -0,0 +1,109 @@
basePath: /api
definitions:
auth.loginDTO:
properties:
login:
type: string
password:
type: string
type: object
auth.user:
properties:
email:
type: string
name:
type: string
password:
type: string
surname:
type: string
username:
type: string
type: object
info:
contact: {}
title: Mobile Example API
version: 1.0.0
paths:
/auth/login:
post:
consumes:
- application/json
description: Логин. Принимает пару юзернейм+пароль.
parameters:
- description: логин
in: body
name: login
required: true
schema:
$ref: '#/definitions/auth.loginDTO'
responses:
"200":
description: OK
"400":
description: Bad Request
"500":
description: Internal Server Error
summary: Логин
tags:
- Auth
/auth/logout:
post:
description: Логаут. Принимает токен авторизации в заголовке "Authorization"
responses:
"200":
description: OK
"400":
description: Bad Request
"500":
description: Internal Server Error
security:
- ApiKeyAuth: []
summary: Логаут
tags:
- Auth
/auth/me:
get:
description: Информация о пользователе. Выдается по токену сессии. Без поля
пароль.
responses:
"200":
description: OK
"400":
description: Bad Request
"500":
description: Internal Server Error
security:
- ApiKeyAuth: []
summary: Информация о пользователе
tags:
- Auth
/auth/register:
post:
consumes:
- application/json
description: Регистрация
parameters:
- description: Регистрация
in: body
name: register
required: true
schema:
$ref: '#/definitions/auth.user'
responses:
"200":
description: OK
"400":
description: Bad Request
"500":
description: Internal Server Error
summary: Регистрация
tags:
- Auth
securityDefinitions:
ApiKeyAuth:
description: Введите "token" для аутентификации
in: header
name: Authorization
type: apiKey
swagger: "2.0"