feat(openapi): complete upload preview and UI evidence

This commit is contained in:
2026-08-28 15:38:14 +03:00
parent d2849ea3fe
commit 2c94af6791
35 changed files with 3655 additions and 537 deletions
+160 -1
View File
@@ -2068,7 +2068,86 @@ var TRANSLATIONS = {
};
Object.assign(TRANSLATIONS.en, {
'openapi.trigger': 'Import OpenAPI',
'openapi.title': 'Import OpenAPI',
'openapi.subtitle': 'Upload one OpenAPI/Swagger file, select methods, and create MCP tool drafts.',
'openapi.close': 'Close',
'openapi.file.label': 'OpenAPI/Swagger file',
'openapi.file.choose': 'Choose file',
'openapi.file.none': 'No file selected',
'openapi.preview': 'Preview document',
'openapi.cancel': 'Cancel request',
'openapi.retry': 'Retry',
'openapi.reset': 'Reset',
'openapi.server.label': 'Base URL',
'openapi.server.custom_aria': 'Custom Base URL',
'openapi.server.placeholder': 'Or provide a base URL, for example https://api.example.com',
'openapi.server.later': 'Specify later',
'openapi.conflict.label': 'If an operation already exists',
'openapi.conflict.rename': 'Create a copy with a new name',
'openapi.conflict.skip': 'Skip it',
'openapi.search.label': 'Search methods',
'openapi.search.placeholder': 'Name, operationId, or path',
'openapi.method.label': 'HTTP method',
'openapi.method.all': 'All methods',
'openapi.select_visible': 'Select visible',
'openapi.clear_visible': 'Clear visible',
'openapi.create': 'Create drafts',
'openapi.selection.empty': 'Selected: 0',
'openapi.selection': 'Selected: {selected} of {total}, shown: {visible}',
'openapi.group.selection': 'selected {selected} of {total}, shown {visible}',
'openapi.group.select': 'Select group',
'openapi.operation.fields': 'inputs: {input} · outputs: {output}',
'openapi.mapping.path': 'Path',
'openapi.mapping.query': 'Query',
'openapi.mapping.header': 'Header',
'openapi.mapping.body': 'Body',
'openapi.mapping.response': 'Response',
'openapi.source.summary': '{name} · {size} · methods: {count}',
'openapi.status.file_ready': 'File is ready for preview.',
'openapi.status.previewing': 'Uploading and parsing the document…',
'openapi.status.preview_ready': 'Document is ready. Select methods to import.',
'openapi.status.creating': 'Creating drafts…',
'openapi.status.created': 'Created: {created}; skipped: {skipped}.',
'openapi.status.cancelled': 'Request cancelled.',
'openapi.status.context_changed': 'The request was cancelled because the context changed.',
'openapi.error.file_required': 'Choose an OpenAPI/Swagger file first.',
'openapi.error.file_type': 'Choose one .yaml, .yml, or .json file with a matching type.',
'openapi.error.file_empty': 'The selected file is empty.',
'openapi.error.file_large': 'The selected file is larger than 256 KiB.',
'openapi.error.no_methods': 'The document does not contain importable methods.',
'openapi.error.workspace': 'No workspace is selected.',
'openapi.error.preview': 'The document could not be previewed.',
'openapi.error.create': 'Drafts could not be created.',
'openapi.error.selection': 'Select at least one method.',
'openapi.error.preview_required': 'Preview the current file first.',
'openapi.error.server': 'Provide a base URL for the drafts.',
'openapi.error.malformed_multipart': 'The upload request is malformed. Choose the file again and retry.',
'openapi.error.invalid_utf8': 'The document must use UTF-8 encoding.',
'openapi.error.invalid_document': 'The selected file is not a valid OpenAPI document.',
'openapi.error.parser_unavailable': 'Document parsing is temporarily unavailable. Retry shortly.',
'openapi.error.storage_unavailable': 'Temporary import storage is unavailable. Retry shortly.',
'openapi.error.source_integrity': 'The uploaded document could not be verified. Choose the file again.',
'openapi.error.source_unavailable': 'The uploaded document is no longer available. Choose it again.',
'openapi.finding.missing_servers': 'No base URL was found in the document.',
'openapi.finding.multiple_servers': 'Several base URLs are available; choose one before creating drafts.',
'openapi.finding.unsupported_request_body': 'This request body needs review in the wizard.',
'openapi.finding.operation_name_renamed': 'The operation name was adjusted to keep it unique.',
'openapi.finding.operation_name_conflict': 'An operation with this name already exists.',
'openapi.finding.weak_tool_description': 'The tool description is too short.',
'openapi.finding.generic': 'This imported item needs review in the wizard.',
'openapi.correlation.request_id': 'Request ID: {id}',
'openapi.correlation.trace_id': 'Trace ID: {id}',
'openapi.result.title': 'Import result',
'openapi.result.open_first': 'Open first draft in the wizard',
'openapi.result.draft': 'Draft',
'openapi.result.findings': 'Findings',
'openapi.result.action': 'Action',
'openapi.result.no_findings': 'No critical findings',
'openapi.result.more': '+{count} more',
'openapi.result.fix': 'Fix in wizard',
'openapi.result.open': 'Open in wizard',
'openapi.result.skipped': 'Skipped',
});
@@ -2103,6 +2182,86 @@ Object.assign(TRANSLATIONS.ru, {
'execution.error.idempotency_in_progress': 'Операция с этим ключом уже выполняется.',
'execution.error.idempotency_conflict': 'Ключ идемпотентности использован с другими параметрами.',
'execution.error.idempotency_outcome_unknown': 'Результат предыдущего выполнения неизвестен; автоматический повтор запрещён.',
'openapi.trigger': 'Импорт OpenAPI',
'openapi.title': 'Импорт OpenAPI',
'openapi.subtitle': 'Загрузите один OpenAPI/Swagger файл, выберите методы и создайте черновики MCP-инструментов.',
'openapi.close': 'Закрыть',
'openapi.file.label': 'Файл OpenAPI/Swagger',
'openapi.file.choose': 'Выбрать файл',
'openapi.file.none': 'Файл не выбран',
'openapi.preview': 'Разобрать документ',
'openapi.cancel': 'Отменить запрос',
'openapi.retry': 'Повторить',
'openapi.reset': 'Сбросить',
'openapi.server.label': 'Base URL',
'openapi.server.custom_aria': 'Свой Base URL',
'openapi.server.placeholder': 'Или укажите свой base URL, например https://api.example.com',
'openapi.server.later': 'Указать позже',
'openapi.conflict.label': 'Если операция уже существует',
'openapi.conflict.rename': 'Создать копию с новым именем',
'openapi.conflict.skip': 'Пропустить',
'openapi.search.label': 'Поиск методов',
'openapi.search.placeholder': 'Название, operationId или путь',
'openapi.method.label': 'HTTP-метод',
'openapi.method.all': 'Все методы',
'openapi.select_visible': 'Выбрать видимые',
'openapi.clear_visible': 'Снять видимые',
'openapi.create': 'Создать черновики',
'openapi.selection.empty': 'Выбрано: 0',
'openapi.selection': 'Выбрано: {selected} из {total}, показано: {visible}',
'openapi.group.selection': 'выбрано {selected} из {total}, показано {visible}',
'openapi.group.select': 'Выбрать группу',
'openapi.operation.fields': 'входов: {input} · выходов: {output}',
'openapi.mapping.path': 'Path',
'openapi.mapping.query': 'Query',
'openapi.mapping.header': 'Header',
'openapi.mapping.body': 'Body',
'openapi.mapping.response': 'Ответ',
'openapi.source.summary': '{name} · {size} · методов: {count}',
'openapi.status.file_ready': 'Файл готов к разбору.',
'openapi.status.previewing': 'Загружаю и разбираю документ…',
'openapi.status.preview_ready': 'Документ готов. Выберите методы для импорта.',
'openapi.status.creating': 'Создаю черновики…',
'openapi.status.created': 'Создано: {created}; пропущено: {skipped}.',
'openapi.status.cancelled': 'Запрос отменён.',
'openapi.status.context_changed': 'Запрос отменён из-за изменения контекста.',
'openapi.error.file_required': 'Сначала выберите файл OpenAPI/Swagger.',
'openapi.error.file_type': 'Выберите один файл .yaml, .yml или .json с подходящим типом.',
'openapi.error.file_empty': 'Выбранный файл пуст.',
'openapi.error.file_large': 'Размер выбранного файла больше 256 KiB.',
'openapi.error.no_methods': 'В документе нет методов для импорта.',
'openapi.error.workspace': 'Не выбран workspace.',
'openapi.error.preview': 'Не удалось разобрать документ.',
'openapi.error.create': 'Не удалось создать черновики.',
'openapi.error.selection': 'Выберите хотя бы один метод.',
'openapi.error.preview_required': 'Сначала разберите текущий файл.',
'openapi.error.server': 'Укажите base URL для черновиков.',
'openapi.error.malformed_multipart': 'Запрос загрузки повреждён. Выберите файл заново и повторите попытку.',
'openapi.error.invalid_utf8': 'Документ должен быть в кодировке UTF-8.',
'openapi.error.invalid_document': 'Выбранный файл не является корректным документом OpenAPI.',
'openapi.error.parser_unavailable': 'Разбор документа временно недоступен. Повторите попытку позже.',
'openapi.error.storage_unavailable': 'Временное хранилище импорта недоступно. Повторите попытку позже.',
'openapi.error.source_integrity': 'Не удалось проверить загруженный документ. Выберите файл заново.',
'openapi.error.source_unavailable': 'Загруженный документ больше недоступен. Выберите его заново.',
'openapi.finding.missing_servers': 'В документе не найден base URL.',
'openapi.finding.multiple_servers': 'В документе несколько base URL; выберите один перед созданием черновиков.',
'openapi.finding.unsupported_request_body': 'Тело этого запроса нужно проверить в мастере.',
'openapi.finding.operation_name_renamed': 'Имя операции изменено, чтобы сохранить уникальность.',
'openapi.finding.operation_name_conflict': 'Операция с таким именем уже существует.',
'openapi.finding.weak_tool_description': 'Описание инструмента слишком короткое.',
'openapi.finding.generic': 'Этот импортированный элемент нужно проверить в мастере.',
'openapi.correlation.request_id': 'Request ID: {id}',
'openapi.correlation.trace_id': 'Trace ID: {id}',
'openapi.result.title': 'Результат импорта',
'openapi.result.open_first': 'Открыть первый черновик в мастере',
'openapi.result.draft': 'Черновик',
'openapi.result.findings': 'Замечания',
'openapi.result.action': 'Действие',
'openapi.result.no_findings': 'Критичных замечаний нет',
'openapi.result.more': '+{count} еще',
'openapi.result.fix': 'Исправить в мастере',
'openapi.result.open': 'Открыть в мастере',
'openapi.result.skipped': 'Пропущено',
});