Repository navigation
docs(downgrader): kin-openapi headers, cookies, form and multipart bodies too - #391
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VVaw7RH2JEkf9zKoSXLUbC
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 27 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
commit: |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VVaw7RH2JEkf9zKoSXLUbC
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Merging this PR will not alter performance
Comparing Footnotes
|
There was a problem hiding this comment.
ℹ️ No critical issues — one wording precision note inline.
Reviewed changes
- kin-openapi body coverage: extends the
openapi3filterlimitation bullet inpackages/downgrader/README.mdto form-encoded fields andmultipart/form-datatext parts, documenting that a 3.1 multi-type part becomes a typelessoneOfin 3.0 whose text part decodes as null. Verified against kin-openapi v0.153.0 source (UrlencodedBodyDecoder→decodeSchemaConstructs→decodeProperty→decodeValue;MultipartBodyDecoder→parsePrimitive) and the 3.1→3.0convertType/scalarOneOfpath.
deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
ℹ️ No new issues in the latest commit — the earlier wording note on the multipart sentence still stands.
Reviewed changes
- Header and cookie parameters: widens the kin-openapi bullet's parameter locations from "query or path" to "query, path, header or cookie". Verified in kin-openapi v0.153.0
req_resp_decoder.go:decodeStyledParameterselectsheaderParamDecoder/cookieParamDecoderand routes both through the samedecodeValue, so the documented last-branchoneOfbehavior applies as written.
deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VVaw7RH2JEkf9zKoSXLUbC
|
Your OpenRouter API key was rejected. Issue a new key with the provider, then update the copy Pullfrog uses, in Pullfrog or in this repo's GitHub Actions secrets. The provider's responsePullfrog provider settings → · GitHub Actions secrets →
|
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Multipart type-list qualifier: narrows the multipart claim to a
typelist without"null", and notes that a list containing"null"downgrades to aoneOfwhose null branch accepts the null thatparsePrimitivereturns. Verified againstconvertType/singleType/scalarOneOf: two or more non-null types become the typelessoneOf, a single-type list collapses to a plaintype, and the nullable list addsonlyNull(), which matches the decodednil.
deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

Docs only. Widens the kin-openapi
openapi3filterbullet from #389 inpackages/downgrader/README.mdfrom query and path values to every parameter location and to request bodies.kin-openapi v0.153.0
openapi3filter.ValidateRequest, run on a 3.1 doc and its downgraded 3.0 output:X-Pr, cookiecpranyOf [$ref Prio (number enum), null]oneOf [$ref, null branch]5X-Nb, cookiecnbanyOf [number, boolean, null]oneOf [number, boolean, null branch]true,5anyOf [$ref Prio, null]oneOf [$ref, null branch]pr=5anyOf [number, boolean, null]oneOf [number, boolean, null branch]nb=5,nb=trueanyOf [$ref I (integer), null]oneOf [$ref, null branch]ir=5type: [string, integer]oneOf [string, integer]decodeSchemaConstructs->decodeProperty) all go through the samedecodeValueas query and path values, so the last-branch decoding from docs(downgrader): kin-openapi's request validation decodes a parameter with the null branch's string type #389 applies to them too.MultipartBodyDecodercallsparsePrimitiveon each text part, andparsePrimitiveonly loops overschema.Type. With notypeit returnsnil, so any union part decodes as null.anyOfunion is rejected there as well, so it behaves the same in both versions.typelist is read correctly, but it becomes aoneOfwith notypein 3.0, so every value is rejected.oneOfs accept any value, since null matches the null branch, so they only loosen.The other diffs in that run come from kin's 3.1 leniency, such as
anyOf [integer, null]acceptingoi=true. Those are not values the input accepts.🤖 Generated with Claude Code
https://claude.ai/code/session_01VVaw7RH2JEkf9zKoSXLUbC