Skip to content

chore(v3-languages): vend API responses as JSON#347

Draft
daniel-jones-dev wants to merge 2 commits into
mainfrom
vend-v3-languages
Draft

chore(v3-languages): vend API responses as JSON#347
daniel-jones-dev wants to merge 2 commits into
mainfrom
vend-v3-languages

Conversation

@daniel-jones-dev
Copy link
Copy Markdown
Member

Summary

  • Commits the live responses from /v3/languages and /v3/languages/resources to data/v3-languages/ (one file per resource plus resources.json), fetched against api.deepl.com with ?include=beta&include=external so the vended data is the full superset.
  • Adds scripts/fetch_v3_languages.py (stdlib-only) that refreshes every file using DEEPL_AUTH_KEY. Pass --free to hit api-free.deepl.com.
  • Updates .mintignore so data/ and scripts/ are not picked up by Mintlify.

This is the first of three stacked PRs:

  1. This PR — vend the responses.
  2. Follow-up: hourly GitHub Action that refreshes these files and opens a PR on diff.
  3. Follow-up: regenerate snippets/language-table.jsx from the vended JSON.

Test plan

  • Inspect data/v3-languages/*.json to confirm each resource is represented.
  • Run DEEPL_AUTH_KEY=... python3 scripts/fetch_v3_languages.py locally; verify no diff against committed files (modulo any genuine upstream change).
  • mint dev still serves the site (data files are ignored).

🤖 Generated with Claude Code

Adds data/v3-languages/ with verbatim responses from /v3/languages and
/v3/languages/resources fetched against api.deepl.com using
?include=beta&include=external. Adds scripts/fetch_v3_languages.py to
regenerate the files from DEEPL_AUTH_KEY.

These files become the single source of truth for repo tooling that
needs to know which languages and features the API supports.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@mintlify
Copy link
Copy Markdown
Contributor

mintlify Bot commented May 19, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
deepl-c950b784 🟢 Ready View Preview May 19, 2026, 12:14 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Adds a --base-url CLI flag (and matching DEEPL_API_BASE_URL env var) to
scripts/fetch_v3_languages.py so the script can be pointed at a
staging environment, mock server, or other test endpoint without
editing the script. The existing --free shortcut remains for the
api-free.deepl.com host; passing both --base-url and --free is rejected.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant