Repository navigation
docs(downgrader): clarify parameter fields beside content and untyped binary strings - #60
Merged
Merged
Conversation
…ed binary strings 3.2 allows only `example` and `examples` beside a parameter's `content`, not `style`, `explode`, or `allowReserved`, so split the row to stop implying it does. Also list, as a 3.1 → 3.0 schema limitation, that an untyped schema gaining a binary `format` gains `type: "string"` and so rejects non-strings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011fEwBizWTNSA9LBukUskYJ
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Split the "parameter properties beside
content" row — the 3.2→3.1 table now separatesexample/examples(removed because 3.1 allows them only besideschema) fromstyle/explode/allowReserved(schema-scoped fields, allowed by neither version besidecontent). MatchesfinishParameterinpackages/downgrader/src/v3.2-to-v3.1.ts:220, which drops the same five keys wheneverparameter.contentis present. - Added a 3.1→3.0 limitations note — an untyped schema that gains a
formatfromcontentEncoding/contentMediaTypealso gainstype: "string". MatchesfinishSchema(packages/downgrader/src/v3.1-to-v3.0.ts:505) and themarks binary strings with formattest, whose untyped{ contentMediaType: "image/png" }case yields{ type: "string", format: "binary" }.
Also verified the 3.2 spec places example/examples at the Parameter Object top level (usable beside content) while style/explode/allowReserved sit under "Fixed Fields for use with schema", so the new rationale is accurate. uncheck packages/downgrader/README.md passes (oxlint + oxfmt).
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
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
This PR updates the downgrader documentation to clarify the handling of OpenAPI 3.2 parameters and JSON Schema type inference during downgrade operations.
Changes Made
example/examplesbesidecontentfrom the rule forstyle/explode/allowReservedbesidecontentinto two distinct rows for clarity, as they have different rationales (3.1 allows examples only beside schema vs. these properties are disallowed in both versions)formatfromcontentEncodingorcontentMediaTypewill also gaintype: "string"during downgrade, explaining this is necessary for 3.0 compatibility with binary strings and file upload detectionNotable Details
https://claude.ai/code/session_011fEwBizWTNSA9LBukUskYJ