feat(API): Add /languages documentation - #1279
Open
junior-ai-bot[bot] wants to merge 2 commits into
Open
junior-ai-bot[bot] wants to merge 2 commits into
junior-ai-bot[bot] wants to merge 2 commits into
Conversation
The API-wide GET /languages endpoint (Api::V2::LanguagesController#index in strings-app) exists and works but was missing from the spec source and published doc/compiled.json, making it undiscoverable via the API reference. Add the path, a "languages" schema modeling the real response shape (an object mapping locale/language code to display name, verified against the live https://api.phrase.com/v2/languages response), and the "Languages" tag, then regenerate doc/compiled.json via `make bundle`. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
API changelog (oasdiff)Doc-only edits (descriptions, examples) do not appear here. |
Sven Dunemann (forelabs)
self-requested a review
September 18, 2026 06:33
Sven Dunemann (forelabs)
requested changes
Sep 18, 2026
- Rename tag from "Languages" to "Supported Languages" per reviewer request - Rename summary to "List supported languages" - Remove rate-limiting note from description (may change in the future) Co-Authored-By: Junior (Claude Sonnet 5) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The API-wide
GET /languagesendpoint exists, is unauthenticated, and is not scoped to any account/project — but it was absent from the OpenAPI spec source and from the publisheddoc/compiled.json, so it could not be discovered via the API reference."/languages"topaths.yaml, referencing a newpaths/languages/index.yamlfollowing the same layout as the existing/formatsendpoint (also unauthenticated, also unscoped).languagesschema (schemas/language.yaml) documenting the real response shape: I called the livehttps://api.phrase.com/v2/languagesendpoint and confirmed the response is a JSON object mapping language/locale code → human-readable display name (e.g.{"de": "German", "en": "English", ...}, 1093 entries as of this writing) — not an array of objects as the ticket's schema wording suggested. The schema models this withadditionalProperties: { type: string }, matching the existingadditionalPropertiespattern already used elsewhere in this repo (e.g.schemas/branch_comparison.yaml).schemas.yamland added aLanguagestag tomain.yaml.doc/compiled.jsonviamake bundle(npx swagger-cli bundle -t json -w 300 main.yaml), so the published spec now includes the endpoint.Test plan
npx swagger-cli validate main.yaml→main.yaml is validbash ./lint.sh(runsopenapi-generator-cli validateagainst the bundled spec) →No validation errorsdoc/compiled.jsonnow containspaths["/languages"]andcomponents.schemas.languages, and that the diff is isolated to the new endpoint (no unrelated regeneration noise)make typescript/ruby/go/etc.) and the TypeScript client test (clients/typescript/__tests__/BasicApiTest.ts) were not run —clients/typescript/srcandpackage.jsonare gitignored/generated-at-release-time only and aren't present in this checkout, and client generation requiresopenapi-generator-cli+ Java tooling that isn't part of this change's scope. These are handled by the repo's own release workflow (make ruby/make typescript/etc.), same as any other new endpoint.Closes STRINGS-3481.
Co-Authored-By: junior-dev