fix(openapi): align glossary entries Accept and rephrase error responses with prod#368
Open
lilkraftwerk wants to merge 2 commits into
Open
fix(openapi): align glossary entries Accept and rephrase error responses with prod#368lilkraftwerk wants to merge 2 commits into
lilkraftwerk wants to merge 2 commits into
Conversation
…prod
Two spec corrections, each verified against api.deepl.com:
- GET /v2/glossaries/{glossary_id}/entries: drop the single-value Accept
enum (keep the default). Prod accepts */* (200) and returns the entries
as TSV; it only rejects an explicit unsupported type with 415. The strict
enum made OpenAPI request-validation reject the common */* request, which
no real client sends a specific Accept for.
- POST /v2/write/rephrase: document the error responses
(400/403/413/415/429/456/500/504), matching its sibling /v2/write/correct.
Prod returns these (confirmed: 400 invalid params, 403 invalid key,
415 unsupported content-type) but the spec declared only 200.
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
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.
What
Two prod-verified spec corrections, surfaced while running the SDK test suites against deepl-mock with OpenAPI request/response validation enabled.
1.
GET /v2/glossaries/{glossary_id}/entries— relax theAcceptheaderThe parameter declared a single-value
enum: [text/tab-separated-values], so OpenAPI request-validation rejected the ordinaryAccept: */*that clients send. Verified againstapi.deepl.com:*/*text/tab-separated-valuesapplication/jsonDropping the
enum(keeping thedefault) matches prod's content negotiation; the existing415response already covers the unsupported case.2.
POST /v2/write/rephrase— document error responsesOnly
200was declared, so spec-validating tooling treats any error as undocumented. Added the same error set as its sibling/v2/write/correct(400/403/413/415/429/456/500/504). Verified against prod:400(invalid params),403(invalid key),415(unsupported content-type).Notes
openapi.jsonis regenerated from YAML by the existing workflow.