basePath: / definitions: auth.GetMeResponse: properties: avatar_key: description: Ключ аватара в S3-хранилище example: avatars/10cb44c1/photo.png type: string class_id: description: UUID класса пользователя example: 1db34ac1-23f1-4b47-82e3-9e8ad16ee1fb type: string created_at: description: Дата создания пользователя example: "2026-03-16T10:30:00Z" type: string email: description: Email пользователя example: example@example.com type: string first_name: description: Имя пользователя example: Иван type: string id: description: UUID пользователя example: 10cb44c1-18f7-4a3e-b0bd-5d2609619d65 type: string is_active: description: Признак активности пользователя example: true type: boolean last_name: description: Фамилия пользователя example: Иванов type: string middle_name: description: Отчество пользователя, если имеется example: Иванович type: string role: allOf: - $ref: '#/definitions/dto.UserRole' description: Роль пользователя в системе enum: - student - teacher - school_admin - super_admin example: student school_id: description: UUID школы пользователя example: 3e1b8139-1f9d-458f-ac70-41f815c8b128 type: string updated_at: description: Дата последнего обновления пользователя example: "2026-03-16T10:30:00Z" type: string required: - email - first_name - last_name - role type: object auth.LoginRequest: properties: email: description: Email пользователя example: example@example.com type: string password: description: Пароль пользователя, минимум 8 символов example: NFMpC9!fm;ARqoh minLength: 8 type: string required: - email - password type: object auth.LoginResponse: properties: access_token: description: JWT access token example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... type: string class_id: description: UUID класса пользователя example: 1db34ac1-23f1-4b47-82e3-9e8ad16ee1fb type: string created_at: description: Дата создания пользователя example: "2026-03-16T10:30:00Z" type: string email: description: Email пользователя example: example@example.com type: string first_name: description: Имя пользователя example: Иван type: string id: description: UUID пользователя example: 10cb44c1-18f7-4a3e-b0bd-5d2609619d65 type: string is_active: description: Признак активности пользователя example: true type: boolean last_name: description: Фамилия пользователя example: Иванов type: string middle_name: description: Отчество пользователя, если имеется example: Иванович type: string refresh_token: description: Refresh token для обновления access token example: b7d0e8d1-47d8-4d3e-8c2b-7b1d0e8a1234 type: string role: allOf: - $ref: '#/definitions/dto.UserRole' description: Роль пользователя в системе enum: - student - teacher - school_admin - super_admin example: student school_id: description: UUID школы пользователя example: 3e1b8139-1f9d-458f-ac70-41f815c8b128 type: string updated_at: description: Дата последнего обновления пользователя example: "2026-03-16T10:30:00Z" type: string required: - email - first_name - last_name - role type: object auth.LogoutRequest: properties: refresh_token: description: Refresh token текущей сессии example: b7d0e8d1-47d8-4d3e-8c2b-7b1d0e8a1234 type: string required: - refresh_token type: object auth.LogoutResponse: properties: id: description: UUID пользователя example: 10cb44c1-18f7-4a3e-b0bd-5d2609619d65 type: string type: object auth.RefreshRequest: properties: refresh_token: description: Текущий refresh token example: b7d0e8d1-47d8-4d3e-8c2b-7b1d0e8a1234 type: string user_id: description: UUID пользователя example: 10cb44c1-18f7-4a3e-b0bd-5d2609619d65 type: string required: - refresh_token - user_id type: object auth.RefreshResponse: properties: access_token: description: JWT access token example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... type: string refresh_token: description: Refresh token для обновления access token example: b7d0e8d1-47d8-4d3e-8c2b-7b1d0e8a1234 type: string type: object auth.RegistrationRequest: properties: email: description: Email пользователя example: example@example.com type: string first_name: description: Имя пользователя example: Иван type: string last_name: description: Фамилия пользователя example: Иванов type: string middle_name: description: Отчество пользователя, если имеется example: Иванович type: string password: description: Пароль пользователя, минимум 8 символов example: NFMpC9!fm;ARqoh minLength: 8 type: string required: - email - first_name - last_name - password type: object auth.RegistrationRequestByAdmin: properties: class_id: description: UUID класса пользователя example: 1db34ac1-23f1-4b47-82e3-9e8ad16ee1fb type: string email: description: Email пользователя example: example@example.com type: string first_name: description: Имя пользователя example: Иван type: string last_name: description: Фамилия пользователя example: Иванов type: string middle_name: description: Отчество пользователя, если имеется example: Иванович type: string role: allOf: - $ref: '#/definitions/dto.UserRole' description: Роль пользователя в системе enum: - student - teacher - school_admin - super_admin example: student school_id: description: UUID школы пользователя example: 3e1b8139-1f9d-458f-ac70-41f815c8b128 type: string required: - email - first_name - last_name - role type: object auth.RegistrationResponse: properties: access_token: description: JWT access token example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... type: string class_id: description: UUID класса пользователя example: 1db34ac1-23f1-4b47-82e3-9e8ad16ee1fb type: string created_at: description: Дата создания пользователя example: "2026-03-16T10:30:00Z" type: string email: description: Email пользователя example: example@example.com type: string first_name: description: Имя пользователя example: Иван type: string id: description: UUID пользователя example: 10cb44c1-18f7-4a3e-b0bd-5d2609619d65 type: string is_active: description: Признак активности пользователя example: true type: boolean last_name: description: Фамилия пользователя example: Иванов type: string middle_name: description: Отчество пользователя, если имеется example: Иванович type: string refresh_token: description: Refresh token для обновления access token example: b7d0e8d1-47d8-4d3e-8c2b-7b1d0e8a1234 type: string role: allOf: - $ref: '#/definitions/dto.UserRole' description: Роль пользователя в системе enum: - student - teacher - school_admin - super_admin example: student school_id: description: UUID школы пользователя example: 3e1b8139-1f9d-458f-ac70-41f815c8b128 type: string updated_at: description: Дата последнего обновления пользователя example: "2026-03-16T10:30:00Z" type: string required: - email - first_name - last_name - role type: object auth.RegistrationResponseByAdmin: properties: class_id: description: UUID класса пользователя example: 1db34ac1-23f1-4b47-82e3-9e8ad16ee1fb type: string created_at: description: Дата создания пользователя example: "2026-03-16T10:30:00Z" type: string email: description: Email пользователя example: example@example.com type: string first_name: description: Имя пользователя example: Иван type: string id: description: UUID пользователя example: 10cb44c1-18f7-4a3e-b0bd-5d2609619d65 type: string is_active: description: Признак активности пользователя example: true type: boolean last_name: description: Фамилия пользователя example: Иванов type: string middle_name: description: Отчество пользователя, если имеется example: Иванович type: string password: description: Сгенерированный временный пароль пользователя example: NFMpC9!fm;ARqoh type: string role: allOf: - $ref: '#/definitions/dto.UserRole' description: Роль пользователя в системе enum: - student - teacher - school_admin - super_admin example: student school_id: description: UUID школы пользователя example: 3e1b8139-1f9d-458f-ac70-41f815c8b128 type: string updated_at: description: Дата последнего обновления пользователя example: "2026-03-16T10:30:00Z" type: string required: - email - first_name - last_name - role type: object class.ClassID: properties: id: description: UUID класса example: 1db34ac1-23f1-4b47-82e3-9e8ad16ee1fb type: string type: object class.ClassResponse: properties: academic_year_end: description: Дата окончания учебного года example: "2026-08-31T00:00:00Z" type: string academic_year_start: description: Дата начала учебного года example: "2025-09-01T00:00:00Z" type: string created_at: description: Дата создания записи example: "2026-03-16T10:30:00Z" type: string id: description: UUID класса example: 1db34ac1-23f1-4b47-82e3-9e8ad16ee1fb type: string number_of_class: description: Номер класса (5, 6, 7...) example: 7 type: integer school_id: description: UUID школы example: 3e1b8139-1f9d-458f-ac70-41f815c8b128 type: string suffixes_of_class: description: Суффикс класса (А, Б, В...) example: А type: string updated_at: description: Дата последнего обновления записи example: "2026-03-16T10:30:00Z" type: string required: - number_of_class - suffixes_of_class type: object class.CreateRequest: properties: academic_year_end: description: Дата окончания учебного года example: "2026-08-31T00:00:00Z" type: string academic_year_start: description: Дата начала учебного года example: "2025-09-01T00:00:00Z" type: string number_of_class: description: Номер класса (5, 6, 7...) example: 7 type: integer suffixes_of_class: description: Суффикс класса (А, Б, В...) example: А type: string required: - number_of_class - suffixes_of_class type: object class.ListResponse: properties: classes: description: Список классов items: $ref: '#/definitions/class.ClassResponse' type: array total: description: Общее количество записей example: 12 type: integer type: object class.UpdateRequest: properties: academic_year_end: description: Дата окончания учебного года example: "2026-08-31T00:00:00Z" type: string academic_year_start: description: Дата начала учебного года example: "2025-09-01T00:00:00Z" type: string number_of_class: description: Номер класса example: 7 type: integer suffixes_of_class: description: Суффикс класса example: Б type: string type: object dto.DifficultyLevel: enum: - simple - medium - advanced type: string x-enum-varnames: - LevelSimple - LevelMedium - LevelAdvanced dto.ErrorResponse: properties: code: example: VALIDATION_ERROR type: string message: example: Некорректный формат email type: string request_id: example: 550e8400-e29b-41d4-a716-446655440000 type: string type: object dto.UserRole: enum: - student - teacher - school_admin - super_admin type: string x-enum-varnames: - RoleStudent - RoleTeacher - RoleSchoolAdmin - RoleSuperAdmin handlers.HealthResponse: properties: status: example: ok type: string type: object handlers.ReadyResponse: properties: status: example: ready type: string type: object interest.CreateRequest: properties: name: description: Название интереса example: Футбол type: string required: - name type: object interest.InterestID: properties: id: description: UUID интереса example: a1b2c3d4-e5f6-7890-abcd-ef1234567890 type: string type: object interest.InterestResponse: properties: created_at: description: Дата создания example: "2026-03-16T10:30:00Z" type: string icon_key: description: Ключ иконки в S3 example: interests/football.png type: string id: description: UUID интереса example: a1b2c3d4-e5f6-7890-abcd-ef1234567890 type: string is_verified: description: Верифицирован ли интерес example: true type: boolean name: description: Название интереса example: Футбол type: string type: object interest.ListResponse: properties: interests: description: Список интересов items: $ref: '#/definitions/interest.InterestResponse' type: array total: description: Общее количество example: 15 type: integer type: object interest.UpdateRequest: properties: icon_key: description: Ключ иконки example: interests/basketball.png type: string name: description: Название интереса example: Баскетбол type: string type: object interest.VerifyRequest: properties: ids: description: Список UUID интересов для верификации example: - '["a1b2c3d4-e5f6-7890-abcd-ef1234567890"]' items: type: string type: array required: - ids type: object interest.VerifyResponse: properties: verified: description: Количество верифицированных интересов example: 3 type: integer type: object profile.ProfileResponse: properties: created_at: description: Дата создания версии example: "2026-03-16T10:30:00Z" type: string default_level: allOf: - $ref: '#/definitions/dto.DifficultyLevel' description: Уровень сложности по умолчанию enum: - simple - medium - advanced example: simple id: description: UUID профиля example: a1b2c3d4-e5f6-7890-abcd-ef1234567890 type: string interests: description: Список UUID интересов items: type: string type: array user_id: description: UUID пользователя example: 10cb44c1-18f7-4a3e-b0bd-5d2609619d65 type: string version: description: Версия профиля example: 1 type: integer type: object profile.UpdateProfileRequest: properties: default_level: allOf: - $ref: '#/definitions/dto.DifficultyLevel' description: Уровень сложности enum: - simple - medium - advanced example: medium interests: description: Список UUID интересов items: type: string type: array type: object school.CreateRequest: properties: city: description: Город школы example: Воронеж type: string name: description: Наименование школы example: МКОУ 'Никольская СОШ' type: string required: - city - name type: object school.ListResponse: properties: schools: description: Список школ items: $ref: '#/definitions/school.SchoolResponse' type: array total: description: Общее количество записей example: 42 type: integer type: object school.SchoolID: properties: id: description: UUID школы example: 10cb44c1-18f7-4a3e-b0bd-5d2609619d65 type: string type: object school.SchoolResponse: properties: city: description: Город школы example: Воронеж type: string created_at: description: Дата создания школы example: "2026-03-16T10:30:00Z" type: string id: description: UUID школы example: 10cb44c1-18f7-4a3e-b0bd-5d2609619d65 type: string logo_key: description: Ключ логотипа в S3-хранилище example: logos/10cb44c1/photo.png type: string name: description: Наименование школы example: МКОУ 'Никольская СОШ' type: string updated_at: description: Дата последнего обновления школы example: "2026-03-16T10:30:00Z" type: string required: - city - name type: object school.UpdateRequest: properties: city: description: Город школы example: Воронеж type: string logo_key: description: Ключ логотипа в S3-хранилище example: logos/10cb44c1/photo.png type: string name: description: Наименование школы example: МКОУ 'Никольская СОШ' type: string type: object user.ChangePasswordRequest: properties: new_password: description: Новый пароль example: NewPass1! minLength: 8 type: string old_password: description: Текущий пароль example: OldPass1! type: string required: - new_password - old_password type: object user.ListResponse: properties: total: description: Общее количество example: 42 type: integer users: description: Список пользователей items: $ref: '#/definitions/user.UserResponse' type: array type: object user.SetActiveRequest: properties: is_active: description: Активен ли пользователь example: false type: boolean type: object user.UpdateProfileRequest: properties: avatar_key: description: Ключ аватара example: avatars/new/photo.png type: string email: description: Email example: new@example.com type: string first_name: description: Имя example: Пётр type: string last_name: description: Фамилия example: Петров type: string middle_name: description: Отчество example: Петрович type: string type: object user.UpdateUserRequest: properties: avatar_key: description: Ключ аватара example: avatars/new/photo.png type: string class_id: description: UUID класса example: 1db34ac1-23f1-4b47-82e3-9e8ad16ee1fb type: string email: description: Email example: new@example.com type: string first_name: description: Имя example: Пётр type: string last_name: description: Фамилия example: Петров type: string middle_name: description: Отчество example: Петрович type: string school_id: description: UUID школы example: 3e1b8139-1f9d-458f-ac70-41f815c8b128 type: string type: object user.UserID: properties: id: description: UUID пользователя example: 10cb44c1-18f7-4a3e-b0bd-5d2609619d65 type: string type: object user.UserResponse: properties: avatar_key: description: Ключ аватара в S3-хранилище example: avatars/10cb44c1/photo.png type: string class_id: description: UUID класса example: 1db34ac1-23f1-4b47-82e3-9e8ad16ee1fb type: string created_at: description: Дата создания example: "2026-03-16T10:30:00Z" type: string email: description: Email пользователя example: example@example.com type: string first_name: description: Имя example: Иван type: string id: description: UUID пользователя example: 10cb44c1-18f7-4a3e-b0bd-5d2609619d65 type: string is_active: description: Признак активности example: true type: boolean last_name: description: Фамилия example: Иванов type: string middle_name: description: Отчество example: Иванович type: string role: allOf: - $ref: '#/definitions/dto.UserRole' description: Роль пользователя enum: - student - teacher - school_admin - super_admin example: student school_id: description: UUID школы example: 3e1b8139-1f9d-458f-ac70-41f815c8b128 type: string updated_at: description: Дата обновления example: "2026-03-16T10:30:00Z" type: string type: object info: contact: {} description: API description title: API version: "1.0" paths: /auth/login: post: consumes: - application/json description: Выполняет вход по email и паролю, возвращает пару токенов. parameters: - description: Учётные данные in: body name: body required: true schema: $ref: '#/definitions/auth.LoginRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/auth.LoginResponse' "400": description: Bad Request schema: $ref: '#/definitions/dto.ErrorResponse' "401": description: Неверный email или пароль schema: $ref: '#/definitions/dto.ErrorResponse' summary: Аутентификация tags: - auth /auth/logout: post: consumes: - application/json description: Инвалидирует переданный refresh token. parameters: - description: Refresh token текущей сессии in: body name: body required: true schema: $ref: '#/definitions/auth.LogoutRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/auth.LogoutResponse' "401": description: Не авторизован schema: $ref: '#/definitions/dto.ErrorResponse' security: - BearerAuth: [] summary: Выход из текущей сессии tags: - auth /auth/logout-all: post: description: Инвалидирует все refresh token текущего пользователя и увеличивает версию сессии. produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/auth.LogoutResponse' "401": description: Не авторизован schema: $ref: '#/definitions/dto.ErrorResponse' security: - BearerAuth: [] summary: Выход со всех устройств tags: - auth /auth/me: get: description: Возвращает данные авторизованного пользователя по JWT. produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/auth.GetMeResponse' "401": description: Не авторизован schema: $ref: '#/definitions/dto.ErrorResponse' security: - BearerAuth: [] summary: Текущий пользователь tags: - auth /auth/refresh: post: consumes: - application/json description: Принимает refresh token и user_id, возвращает новую пару access + refresh. parameters: - description: Refresh token и ID пользователя in: body name: body required: true schema: $ref: '#/definitions/auth.RefreshRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/auth.RefreshResponse' "400": description: Bad Request schema: $ref: '#/definitions/dto.ErrorResponse' "401": description: Невалидный или истёкший refresh token schema: $ref: '#/definitions/dto.ErrorResponse' summary: Обновление токенов tags: - auth /auth/registration: post: consumes: - application/json description: Создаёт нового пользователя с ролью student и возвращает пару токенов. parameters: - description: Данные регистрации in: body name: body required: true schema: $ref: '#/definitions/auth.RegistrationRequest' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/auth.RegistrationResponse' "400": description: Bad Request schema: $ref: '#/definitions/dto.ErrorResponse' "409": description: Email уже зарегистрирован schema: $ref: '#/definitions/dto.ErrorResponse' summary: Самостоятельная регистрация tags: - auth /auth/registration/admin: post: consumes: - application/json description: Создаёт пользователя с указанной ролью и генерирует временный пароль. Для school_admin school_id подставляется автоматически из токена. parameters: - description: Данные нового пользователя in: body name: body required: true schema: $ref: '#/definitions/auth.RegistrationRequestByAdmin' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/auth.RegistrationResponseByAdmin' "400": description: Bad Request schema: $ref: '#/definitions/dto.ErrorResponse' "403": description: Недостаточно прав schema: $ref: '#/definitions/dto.ErrorResponse' "409": description: Email уже зарегистрирован schema: $ref: '#/definitions/dto.ErrorResponse' security: - BearerAuth: [] summary: Создание пользователя админом tags: - auth /infra/health: get: description: Возвращает успешный ответ, если HTTP-сервис запущен и способен обрабатывать запросы. produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.HealthResponse' summary: Проверка доступности сервиса tags: - infra /infra/metrics: get: description: Возвращает метрики приложения в формате Prometheus для внешнего сбора и мониторинга. produces: - text/plain responses: "200": description: OK schema: type: string summary: Метрики приложения tags: - infra /infra/ready: get: description: Проверяет готовность приложения к обработке трафика и доступность критичных зависимостей, таких как база данных и кэш. produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.ReadyResponse' "503": description: Service Unavailable schema: $ref: '#/definitions/dto.ErrorResponse' summary: Проверка готовности сервиса tags: - infra /interests: get: description: Возвращает список интересов с фильтрацией и пагинацией. parameters: - description: Поиск по названию in: query name: name type: string - description: Фильтр по верификации in: query name: is_verified type: boolean - description: Количество записей in: query name: limit type: integer - description: Смещение in: query name: offset type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/interest.ListResponse' security: - BearerAuth: [] summary: Список интересов tags: - interests post: consumes: - application/json description: Создаёт новый верифицированный интерес. Доступно только super_admin. parameters: - description: Данные интереса in: body name: body required: true schema: $ref: '#/definitions/interest.CreateRequest' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/interest.InterestResponse' "400": description: Bad Request schema: $ref: '#/definitions/dto.ErrorResponse' "409": description: Интерес уже существует schema: $ref: '#/definitions/dto.ErrorResponse' security: - BearerAuth: [] summary: Создание интереса tags: - interests /interests/{id}: delete: description: Физически удаляет интерес из справочника. Доступно только super_admin. parameters: - description: UUID интереса in: path name: id required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/interest.InterestID' "404": description: Not Found schema: $ref: '#/definitions/dto.ErrorResponse' security: - BearerAuth: [] summary: Удаление интереса tags: - interests patch: consumes: - application/json description: Обновляет название или иконку интереса. Доступно только super_admin. parameters: - description: UUID интереса in: path name: id required: true type: string - description: Обновляемые поля in: body name: body required: true schema: $ref: '#/definitions/interest.UpdateRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/interest.InterestResponse' "404": description: Not Found schema: $ref: '#/definitions/dto.ErrorResponse' "409": description: Интерес с таким названием уже существует schema: $ref: '#/definitions/dto.ErrorResponse' security: - BearerAuth: [] summary: Обновление интереса tags: - interests /interests/verify: post: consumes: - application/json description: Верифицирует интересы по списку ID. Доступно только super_admin. parameters: - description: Список ID для верификации in: body name: body required: true schema: $ref: '#/definitions/interest.VerifyRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/interest.VerifyResponse' "400": description: Bad Request schema: $ref: '#/definitions/dto.ErrorResponse' security: - BearerAuth: [] summary: Массовая верификация интересов tags: - interests /schools: get: description: Возвращает список школ с фильтрацией и пагинацией. parameters: - description: Поиск по названию (подстрока) in: query name: name type: string - description: Фильтр по городу in: query name: city type: string - description: Количество записей (по умолчанию 20, макс 100) in: query name: limit type: integer - description: Смещение (по умолчанию 0) in: query name: offset type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/school.ListResponse' security: - BearerAuth: [] summary: Список школ tags: - schools post: consumes: - application/json description: Создаёт новую школу. Доступно только super_admin. parameters: - description: Данные школы in: body name: body required: true schema: $ref: '#/definitions/school.CreateRequest' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/school.SchoolResponse' "400": description: Bad Request schema: $ref: '#/definitions/dto.ErrorResponse' "403": description: Недостаточно прав schema: $ref: '#/definitions/dto.ErrorResponse' security: - BearerAuth: [] summary: Создание школы tags: - schools /schools/{id}: delete: description: Мягкое удаление школы. Доступно только super_admin. parameters: - description: UUID школы in: path name: id required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/school.SchoolID' "403": description: Недостаточно прав schema: $ref: '#/definitions/dto.ErrorResponse' "404": description: Школа не найдена schema: $ref: '#/definitions/dto.ErrorResponse' security: - BearerAuth: [] summary: Удаление школы tags: - schools get: description: Возвращает данные школы по ID. parameters: - description: UUID школы in: path name: id required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/school.SchoolResponse' "404": description: Школа не найдена schema: $ref: '#/definitions/dto.ErrorResponse' security: - BearerAuth: [] summary: Получение школы tags: - schools patch: consumes: - application/json description: Обновляет данные школы. Доступно super_admin и school_admin своей школы. parameters: - description: UUID школы in: path name: id required: true type: string - description: Обновляемые поля in: body name: body required: true schema: $ref: '#/definitions/school.UpdateRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/school.SchoolResponse' "400": description: Bad Request schema: $ref: '#/definitions/dto.ErrorResponse' "403": description: Недостаточно прав schema: $ref: '#/definitions/dto.ErrorResponse' "404": description: Школа не найдена schema: $ref: '#/definitions/dto.ErrorResponse' security: - BearerAuth: [] summary: Обновление школы tags: - schools /schools/{id}/restore: post: description: Восстанавливает мягко удалённую школу. Доступно только super_admin. parameters: - description: UUID школы in: path name: id required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/school.SchoolResponse' "403": description: Недостаточно прав schema: $ref: '#/definitions/dto.ErrorResponse' "404": description: Удалённая школа не найдена schema: $ref: '#/definitions/dto.ErrorResponse' security: - BearerAuth: [] summary: Восстановление школы tags: - schools /schools/{school_id}/classes: get: description: Возвращает список классов школы с фильтрацией и пагинацией. parameters: - description: UUID школы in: path name: school_id type: string - description: Фильтр по номеру класса in: query name: number_of_class type: integer - description: Количество записей (по умолчанию 20, макс 100) in: query name: limit type: integer - description: Смещение (по умолчанию 0) in: query name: offset type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/class.ListResponse' security: - BearerAuth: [] summary: Список классов школы tags: - classes post: consumes: - application/json description: Создаёт новый класс в школе. Доступно super_admin и school_admin своей школы. parameters: - description: UUID школы in: path name: school_id required: true type: string - description: Данные класса in: body name: body required: true schema: $ref: '#/definitions/class.CreateRequest' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/class.ClassResponse' "400": description: Bad Request schema: $ref: '#/definitions/dto.ErrorResponse' "403": description: Недостаточно прав schema: $ref: '#/definitions/dto.ErrorResponse' "409": description: Класс с таким номером и суффиксом уже существует schema: $ref: '#/definitions/dto.ErrorResponse' security: - BearerAuth: [] summary: Создание класса tags: - classes /schools/{school_id}/classes/{id}: delete: description: Мягкое удаление класса. Доступно super_admin и school_admin своей школы. parameters: - description: UUID школы in: path name: school_id required: true type: string - description: UUID класса in: path name: id required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/class.ClassID' "403": description: Недостаточно прав schema: $ref: '#/definitions/dto.ErrorResponse' "404": description: Класс не найден schema: $ref: '#/definitions/dto.ErrorResponse' security: - BearerAuth: [] summary: Удаление класса tags: - classes get: description: Возвращает данные класса по ID. parameters: - description: UUID школы in: path name: school_id required: true type: string - description: UUID класса in: path name: id required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/class.ClassResponse' "404": description: Класс не найден schema: $ref: '#/definitions/dto.ErrorResponse' security: - BearerAuth: [] summary: Получение класса tags: - classes patch: consumes: - application/json description: Обновляет данные класса. Доступно super_admin и school_admin своей школы. parameters: - description: UUID школы in: path name: school_id required: true type: string - description: UUID класса in: path name: id required: true type: string - description: Обновляемые поля in: body name: body required: true schema: $ref: '#/definitions/class.UpdateRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/class.ClassResponse' "400": description: Bad Request schema: $ref: '#/definitions/dto.ErrorResponse' "403": description: Недостаточно прав schema: $ref: '#/definitions/dto.ErrorResponse' "404": description: Класс не найден schema: $ref: '#/definitions/dto.ErrorResponse' "409": description: Класс с таким номером и суффиксом уже существует schema: $ref: '#/definitions/dto.ErrorResponse' security: - BearerAuth: [] summary: Обновление класса tags: - classes /schools/{school_id}/classes/{id}/restore: post: description: Восстанавливает мягко удалённый класс. Доступно только super_admin. parameters: - description: UUID школы in: path name: school_id required: true type: string - description: UUID класса in: path name: id required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/class.ClassResponse' "403": description: Недостаточно прав schema: $ref: '#/definitions/dto.ErrorResponse' "404": description: Удалённый класс не найден schema: $ref: '#/definitions/dto.ErrorResponse' security: - BearerAuth: [] summary: Восстановление класса tags: - classes /users: get: description: Возвращает список пользователей с фильтрацией и пагинацией. school_admin видит только свою школу. parameters: - description: Фильтр по школе in: query name: school_id type: string - description: Фильтр по классу in: query name: class_id type: string - description: Фильтр по роли in: query name: role type: string - description: Поиск по ФИО in: query name: name type: string - description: Количество записей in: query name: limit type: integer - description: Смещение in: query name: offset type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/user.ListResponse' security: - BearerAuth: [] summary: Список пользователей tags: - users /users/{id}: delete: description: Мягкое удаление. Доступно только super_admin. parameters: - description: UUID пользователя in: path name: id required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/user.UserID' "404": description: Not Found schema: $ref: '#/definitions/dto.ErrorResponse' security: - BearerAuth: [] summary: Удаление пользователя tags: - users get: description: Возвращает данные пользователя по ID. parameters: - description: UUID пользователя in: path name: id required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/user.UserResponse' "404": description: Not Found schema: $ref: '#/definitions/dto.ErrorResponse' security: - BearerAuth: [] summary: Получение пользователя tags: - users patch: consumes: - application/json description: Обновляет данные пользователя, включая привязку к школе и классу. parameters: - description: UUID пользователя in: path name: id required: true type: string - description: Обновляемые поля in: body name: body required: true schema: $ref: '#/definitions/user.UpdateUserRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/user.UserResponse' "400": description: Bad Request schema: $ref: '#/definitions/dto.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/dto.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/dto.ErrorResponse' "409": description: Email уже зарегистрирован schema: $ref: '#/definitions/dto.ErrorResponse' security: - BearerAuth: [] summary: Обновление пользователя админом tags: - users /users/{id}/active: patch: consumes: - application/json description: Устанавливает активность пользователя. Доступно super_admin и school_admin своей школы. parameters: - description: UUID пользователя in: path name: id required: true type: string - description: Активность in: body name: body required: true schema: $ref: '#/definitions/user.SetActiveRequest' produces: - application/json responses: "200": description: ok schema: additionalProperties: type: string type: object "403": description: Forbidden schema: $ref: '#/definitions/dto.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/dto.ErrorResponse' security: - BearerAuth: [] summary: Активация/деактивация пользователя tags: - users /users/{id}/restore: post: description: Восстанавливает мягко удалённого пользователя. Доступно только super_admin. parameters: - description: UUID пользователя in: path name: id required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/user.UserResponse' "404": description: Not Found schema: $ref: '#/definitions/dto.ErrorResponse' security: - BearerAuth: [] summary: Восстановление пользователя tags: - users /users/me: patch: consumes: - application/json description: Обновляет ФИО, email и аватар текущего пользователя. parameters: - description: Обновляемые поля in: body name: body required: true schema: $ref: '#/definitions/user.UpdateProfileRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/user.UserResponse' "400": description: Bad Request schema: $ref: '#/definitions/dto.ErrorResponse' "409": description: Email уже зарегистрирован schema: $ref: '#/definitions/dto.ErrorResponse' security: - BearerAuth: [] summary: Обновление своего профиля tags: - users /users/me/password: post: consumes: - application/json description: Меняет пароль текущего пользователя. parameters: - description: Старый и новый пароль in: body name: body required: true schema: $ref: '#/definitions/user.ChangePasswordRequest' produces: - application/json responses: "200": description: ok schema: additionalProperties: type: string type: object "400": description: Bad Request schema: $ref: '#/definitions/dto.ErrorResponse' "401": description: Неверный текущий пароль schema: $ref: '#/definitions/dto.ErrorResponse' security: - BearerAuth: [] summary: Смена пароля tags: - users /users/me/profile: get: description: Возвращает текущий активный профиль ученика. produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/profile.ProfileResponse' "404": description: Профиль не найден schema: $ref: '#/definitions/dto.ErrorResponse' security: - BearerAuth: [] summary: Профиль ученика tags: - profile patch: consumes: - application/json description: Обновляет уровень сложности и/или интересы. Создаёт новую версию профиля. parameters: - description: Обновляемые поля in: body name: body required: true schema: $ref: '#/definitions/profile.UpdateProfileRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/profile.ProfileResponse' "400": description: Bad Request schema: $ref: '#/definitions/dto.ErrorResponse' "404": description: Профиль не найден schema: $ref: '#/definitions/dto.ErrorResponse' security: - BearerAuth: [] summary: Обновление профиля ученика tags: - profile securityDefinitions: BearerAuth: description: 'Введите токен в формате: Bearer {access_token}' in: header name: Authorization type: apiKey swagger: "2.0" tags: - description: 'Служебные эндпоинты приложения: доступность, готовность и метрики мониторинга.' name: infra - description: Эндпоинты для работы с авторизацией пользователей name: auth - description: 'Управление школами: создание, обновление, удаление и поиск.' name: schools - description: 'Управление классами внутри школы: создание, обновление, удаление и поиск.' name: classes - description: 'Управление пользователями: профиль, пароль, список, активация, удаление.' name: users - description: Справочник интересов учеников для адаптивного обучения. name: interests - description: 'Профиль ученика: уровень сложности и интересы.' name: profile