Skip to content

🔧 chore(docs): add Swagger documentation for the TMX import and export API endpoints#4589

Open
mauretto78 wants to merge 1 commit into
developfrom
tmx-api-docs
Open

🔧 chore(docs): add Swagger documentation for the TMX import and export API endpoints#4589
mauretto78 wants to merge 1 commit into
developfrom
tmx-api-docs

Conversation

@mauretto78
Copy link
Copy Markdown
Contributor

@mauretto78 mauretto78 commented May 21, 2026

Summary

Add Swagger documentation for the TMX import and export API endpoints.

Type

  • chore — build, deps, config, docs

Changes

File Change
public/api/swagger-source.js Added Swagger specs for POST /api/v3/tmx/import and POST /api/v3/tmx/export under a new TMX tag

Testing

  • Manual testing performed (describe below)

Opened API docs page (/api/docs)

AI Disclosure

  • AI tools were used — name the agent/tool below

Copilot AI review requested due to automatic review settings May 21, 2026 10:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Swagger (OpenAPI v2) documentation entries for the TMX import/export endpoints in the v3 API, so they appear in /api/docs alongside the existing API surface.

Changes:

  • Documented POST /api/v3/tmx/import (multipart TMX upload).
  • Documented POST /api/v3/tmx/export (request TMX export via email) under a new TMX tag.

Comment on lines +4387 to +4393
name: 'name',
in: 'formData',
description: 'The name for the TM key.',
required: false,
type: 'string',
},
{
name: 'tm_key',
in: 'formData',
description:
'The TM key where the TMX will be imported. If not provided, the default MyMemory key will be used.',
tags: ['TMX'],
summary: 'Export TMX file',
description:
'Request the export of a TMX file. The exported file will be sent via email. Requires authentication.',
Comment on lines +4446 to +4469
description:
'Request the export of a TMX file. The exported file will be sent via email. Requires authentication.',
parameters: [
{
name: 'tm_key',
in: 'formData',
description: 'The TM key to export.',
required: true,
type: 'string',
},
{
name: 'tm_name',
in: 'formData',
description: 'The name of the TM.',
required: true,
type: 'string',
},
{
name: 'email',
in: 'formData',
description: 'The email address to send the exported TMX to.',
required: false,
type: 'string',
},
@github-actions
Copy link
Copy Markdown

🧪 Test-Guard Report

❌ FAIL — Some changed source files lack adequate test coverage.

Coverage Analysis: ❌ FAIL

No changed source files found in coverage report (threshold: 80%)

📋 1 files: 1 ❌ fail
File Verdict Reason
public/api/swagger-source.js ❌ fail not in coverage report

Test File Matching: ❌ FAIL

File matching: 1 fail

📋 1 files: 1 ❌ fail
File Verdict Reason
public/api/swagger-source.js ❌ fail No matching test file found

Per-File Evaluation: ❌ FAIL

All files resolved by deterministic shortcuts.

📋 1 files: 1 ❌ fail
File Verdict Reason
public/api/swagger-source.js ❌ fail shortcut → no relevant tests in PR and no/low coverage

Result: ❌ FAIL


Why this FAIL?

  • Coverage Analysis: public/api/swagger-source.js is missing from the coverage report, indicating a coverage configuration issue that prevents tracking this file → update coverage configuration to include this source file.
  • Test File Matching: No test file matches public/api/swagger-source.js → add or link appropriate tests for this source file.
  • Per-File Evaluation: Deterministic shortcut confirms no relevant tests or coverage for public/api/swagger-source.js → add tests and fix coverage config to ensure this file is tested and tracked.

To resolve: add tests for public/api/swagger-source.js and update coverage configuration to include it in reports.

@Ostico Ostico changed the title 🔧 chore(docs): add Swagger documentation for the TMX import and export API endpoints 🔧 chore(docs): add Swagger documentation for the TMX import and export API endpoints. May 21, 2026
@Ostico Ostico changed the title 🔧 chore(docs): add Swagger documentation for the TMX import and export API endpoints. 🔧 chore(docs): add Swagger documentation for the TMX import and export API endpoints May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants