1 Commits
Author SHA1 Message Date
gnome627andClaude Opus 5.5 801eee915a fix(swagger): починил рендер в Gitea (openapi-swagger)
- js-yaml 5 (парсер Gitea) падает на deficient indentation: закрывающие }
  flow-маппингов example стояли на уровне ключа-родителя
- /survey/index: коды 400-500 были вложены в 200, у 200 не было description
- /goal/*: responses ссылался $ref'ом целиком на components/responses;
  GoalIndexResponse содержал карту кодов вместо Response, а схема
  GoalActionResponse лежала в components/responses — перенёс в schemas

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:43:47 +06:00
+152 -187
View File
@@ -79,8 +79,6 @@ tags:
description: Methods for admin oversight of personal API tokens. Requires "api-tokens-admin" permission. description: Methods for admin oversight of personal API tokens. Requires "api-tokens-admin" permission.
- name: admin-employment - name: admin-employment
description: Methods for administrative read-only access to employee employments, including external identifiers used by integrations. Requires "user-edit" permission. description: Methods for administrative read-only access to employee employments, including external identifiers used by integrations. Requires "user-edit" permission.
- name: system-notifications
description: Methods for reading active HRBox system announcements (home page banner for portal administrators). Requires "admin-controls" permission.
paths: paths:
/mobile/bind/{id}/{token}: /mobile/bind/{id}/{token}:
@@ -1114,7 +1112,7 @@ paths:
example: { example: {
"type": "success", "type": "success",
"text": "Запись установлена основной!" "text": "Запись установлена основной!"
} }
errors: errors:
description: Array of validation errors. description: Array of validation errors.
type: array type: array
@@ -5688,6 +5686,7 @@ paths:
responses: responses:
200: 200:
description: Список опросов
content: content:
application/json: application/json:
schema: schema:
@@ -5701,16 +5700,16 @@ paths:
$ref: '#/components/schemas/_links' $ref: '#/components/schemas/_links'
_meta: _meta:
$ref: '#/components/schemas/_meta' $ref: '#/components/schemas/_meta'
400: 400:
description: Bad Request. description: Bad Request.
401: 401:
description: Unauthorized. description: Unauthorized.
403: 403:
description: Unauthorized. description: Unauthorized.
404: 404:
description: Not found. description: Not found.
500: 500:
description: Server Error. description: Server Error.
/survey-assignment/index: /survey-assignment/index:
get: get:
@@ -6023,7 +6022,16 @@ paths:
- $ref: '#/components/parameters/noDraft' - $ref: '#/components/parameters/noDraft'
- $ref: '#/components/parameters/goalParentId' - $ref: '#/components/parameters/goalParentId'
responses: responses:
$ref: '#/components/responses/GoalActionResponse' 200:
$ref: '#/components/responses/GoalIndexResponse'
400:
description: Bad Request.
403:
description: Unauthorized.
404:
description: Not found.
500:
description: Server Error.
/goal/supervise: /goal/supervise:
get: get:
@@ -6043,7 +6051,16 @@ paths:
- $ref: '#/components/parameters/noDraft' - $ref: '#/components/parameters/noDraft'
- $ref: '#/components/parameters/goalParentId' - $ref: '#/components/parameters/goalParentId'
responses: responses:
$ref: '#/components/responses/GoalActionResponse' 200:
$ref: '#/components/responses/GoalIndexResponse'
400:
description: Bad Request.
403:
description: Unauthorized.
404:
description: Not found.
500:
description: Server Error.
/goal/archive: /goal/archive:
get: get:
@@ -6062,7 +6079,16 @@ paths:
- $ref: '#/components/parameters/goalParentId' - $ref: '#/components/parameters/goalParentId'
- $ref: '#/components/parameters/goalIntervalTypeId' - $ref: '#/components/parameters/goalIntervalTypeId'
responses: responses:
$ref: '#/components/responses/GoalActionResponse' 200:
$ref: '#/components/responses/GoalIndexResponse'
400:
description: Bad Request.
403:
description: Unauthorized.
404:
description: Not found.
500:
description: Server Error.
/goal/view: /goal/view:
get: get:
@@ -6164,7 +6190,16 @@ paths:
items: items:
$ref: '#/components/schemas/GoalItem' $ref: '#/components/schemas/GoalItem'
responses: responses:
$ref: '#/components/responses/GoalActionResponse' 200:
$ref: '#/components/responses/GoalActionResponse'
400:
description: Bad Request.
403:
description: Unauthorized.
404:
description: Not found.
500:
description: Server Error.
/goal/approve: /goal/approve:
post: post:
@@ -6185,7 +6220,16 @@ paths:
items: items:
$ref: '#/components/schemas/GoalItem' $ref: '#/components/schemas/GoalItem'
responses: responses:
$ref: '#/components/responses/GoalActionResponse' 200:
$ref: '#/components/responses/GoalActionResponse'
400:
description: Bad Request.
403:
description: Unauthorized.
404:
description: Not found.
500:
description: Server Error.
/goal/reject: /goal/reject:
post: post:
@@ -6206,7 +6250,16 @@ paths:
items: items:
$ref: '#/components/schemas/GoalItem' $ref: '#/components/schemas/GoalItem'
responses: responses:
$ref: '#/components/responses/GoalActionResponse' 200:
$ref: '#/components/responses/GoalActionResponse'
400:
description: Bad Request.
403:
description: Unauthorized.
404:
description: Not found.
500:
description: Server Error.
/goal/finish: /goal/finish:
post: post:
@@ -6227,7 +6280,16 @@ paths:
items: items:
$ref: '#/components/schemas/GoalItem' $ref: '#/components/schemas/GoalItem'
responses: responses:
$ref: '#/components/responses/GoalActionResponse' 200:
$ref: '#/components/responses/GoalActionResponse'
400:
description: Bad Request.
403:
description: Unauthorized.
404:
description: Not found.
500:
description: Server Error.
/goal/remove: /goal/remove:
post: post:
@@ -6248,7 +6310,16 @@ paths:
type: string type: string
format: uuid format: uuid
responses: responses:
$ref: '#/components/responses/GoalActionResponse' 200:
$ref: '#/components/responses/GoalActionResponse'
400:
description: Bad Request.
403:
description: Unauthorized.
404:
description: Not found.
500:
description: Server Error.
/goal/bind: /goal/bind:
post: post:
@@ -6278,7 +6349,16 @@ paths:
format: uuid format: uuid
description: Цели которые необходимо привязать description: Цели которые необходимо привязать
responses: responses:
$ref: '#/components/responses/GoalActionResponse' 200:
$ref: '#/components/responses/GoalActionResponse'
400:
description: Bad Request.
403:
description: Unauthorized.
404:
description: Not found.
500:
description: Server Error.
/goal/unbind: /goal/unbind:
post: post:
@@ -6300,7 +6380,16 @@ paths:
type: string type: string
format: uuid format: uuid
responses: responses:
$ref: '#/components/responses/GoalActionResponse' 200:
$ref: '#/components/responses/GoalActionResponse'
400:
description: Bad Request.
403:
description: Unauthorized.
404:
description: Not found.
500:
description: Server Error.
/goal-report/users: /goal-report/users:
post: post:
@@ -6450,7 +6539,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/responses/GoalActionResponse' $ref: '#/components/schemas/GoalActionResponse'
422: 422:
description: Bad Request description: Bad Request
403: 403:
@@ -8266,101 +8355,6 @@ paths:
Запись не найдена. Включает случаи обращения к записям, Запись не найдена. Включает случаи обращения к записям,
принадлежащим другим тенантам. принадлежащим другим тенантам.
/system-notifications/active:
get:
tags: [system-notifications]
summary: Получить активные системные объявления
description: |
Возвращает постраничный список активных системных объявлений HRBox
(по умолчанию 20 на страницу, максимум 50). По умолчанию сортировка
по дате публикации, сначала новые. Используется для баннера
на главной странице портала.
Тело каждого объявления (`body_html`) рендерится из markdown на языке
профиля текущего пользователя с откатом на русский, если перевод
отсутствует, и очищается до ограниченного набора тегов: `p`, `br`,
`strong`, `em`, `del`, `ul`, `ol`, `li`, `a` (внешние `http`/`https` —
с `target="_blank" rel="noopener noreferrer"`; пути портала от корня
`/…` и `mailto:` — без `target`). Если после очистки
текста не осталось, объявление всё равно попадает в выдачу
с пустым `body_html` — клиенты такие объявления не показывают.
Объявления, скрытые текущим пользователем
(`POST /system-notifications/dismiss`), в выдачу не попадают.
operationId: systemNotificationsActive
parameters:
- name: per-page
in: query
schema: { type: integer, minimum: 1, maximum: 50, default: 20 }
description: Значение больше 50 урезается до 50.
- name: page
in: query
schema: { type: integer, minimum: 1, default: 1 }
- name: sort
in: query
schema:
type: string
enum:
- published_at
- -published_at
description: По умолчанию `-published_at`.
responses:
200:
description: Список активных объявлений.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/SystemNotification'
_links:
$ref: '#/components/schemas/_links'
_meta:
$ref: '#/components/schemas/_meta'
403:
description: |
У текущего пользователя отсутствует право `admin-controls`.
/system-notifications/dismiss:
post:
tags: [system-notifications]
summary: Скрыть системное объявление
description: |
Скрывает активное системное объявление для текущего пользователя
на всех устройствах и во всех интерфейсах. Скрытое объявление
перестаёт возвращаться методом `GET /system-notifications/active`.
Метод идемпотентен: повторный вызов для уже скрытого объявления
также возвращает 204.
operationId: systemNotificationsDismiss
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [id]
properties:
id: { type: string, format: uuid, description: ID объявления. }
application/x-www-form-urlencoded:
schema:
type: object
required: [id]
properties:
id: { type: string, format: uuid }
responses:
204:
description: Объявление скрыто (или уже было скрыто ранее).
422:
description: |
Ошибка валидации (`success: false`, список в `errors`): id не UUID
или объявление сейчас не активно (не опубликовано, истекло, отозвано).
403:
description: |
У текущего пользователя отсутствует право `admin-controls`.
components: components:
securitySchemes: securitySchemes:
SessionAuth: SessionAuth:
@@ -11529,7 +11523,7 @@ components:
example: { example: {
"width": 1920, "width": 1920,
"height": 1080 "height": 1080
} }
properties: properties:
width: width:
description: Image width. description: Image width.
@@ -13927,31 +13921,27 @@ components:
_meta: _meta:
$ref: '#/components/schemas/_meta' $ref: '#/components/schemas/_meta'
SystemNotification: GoalActionResponse:
description: Goal object
type: object type: object
description: Системное объявление HRBox в баннере на главной странице портала.
properties: properties:
id: success:
type: string type: boolean
format: uuid deleted:
description: Идентификатор объявления. type: array
body_html: items:
type: string $ref: '#/components/schemas/GoalItem'
description: | description: Цели которые были удалены
Текст объявления, отрендеренный из markdown в HTML на языке updated:
профиля пользователя (откат на русский, если перевод отсутствует) type: array
и очищенный до ограниченного набора тегов: `p`, `br`, `strong`, items:
`em`, `del`, `ul`, `ol`, `li`, `a` (внешние `http`/`https` — $ref: '#/components/schemas/GoalItem'
с `target="_blank" rel="noopener noreferrer"`; пути портала от корня description: Цели которые были обновлены
`/…` и `mailto:` — без `target`). Пустая строка, skipped:
если после очистки текста не осталось — такие объявления клиенты type: array
не показывают. items:
example: "<p>Плановые работы <strong>1 октября</strong> с 02:00 до 04:00 МСК.</p>" $ref: '#/components/schemas/GoalItem'
published_at: description: Цели которые не были обработаны
type: string
format: date-time
description: Дата и время публикации, ISO 8601 со смещением.
example: "2026-09-24T16:30:04+03:00"
parameters: parameters:
boardDateTypeParam: boardDateTypeParam:
@@ -14088,53 +14078,28 @@ components:
responses: responses:
GoalIndexResponse: GoalIndexResponse:
200: description: Список целей
description: Список целей content:
content: application/json:
application/json: schema:
schema: type: object
type: object properties:
properties: data:
data: type: array
items:
type: array type: array
items: items:
type: array $ref: '#/components/schemas/GoalItem'
items: _links:
$ref: '#/components/schemas/GoalItem' $ref: '#/components/schemas/_links'
_links: _meta:
$ref: '#/components/schemas/_links' $ref: '#/components/schemas/_meta'
_meta:
$ref: '#/components/schemas/_meta'
400:
description: Bad Request.
403:
description: Unauthorized.
404:
description: Not found.
500:
description: Server Error.
GoalActionResponse: GoalActionResponse:
description: Goal object description: Результат действия над целями
type: object content:
properties: application/json:
success: schema:
type: boolean $ref: '#/components/schemas/GoalActionResponse'
deleted:
type: array
items:
$ref: '#/components/schemas/GoalItem'
description: Цели которые были удалены
updated:
type: array
items:
$ref: '#/components/schemas/GoalItem'
description: Цели которые были обновлены
skipped:
type: array
items:
$ref: '#/components/schemas/GoalItem'
description: Цели которые не были обработаны
security: security:
- SessionAuth: [ ] - SessionAuth: [ ]