Repository navigation
fix(explorer): keep scalar query and header values on exploded parameters - #1625
Merged
sserrata merged 1 commit intoOct 9, 2026
Merged
Conversation
…ters A parameter declared explode: true whose value was not a JSON object was routed into the exploded-object branch of setQueryParams, which enumerated a non-object and replaced the typed value with an empty string in the sent request and the code snippet; the header branch threw on a decoded null. Fall through to the scalar handling, which serialises an exploded scalar the same way as an unexploded one.
|
Visit the preview URL for this PR (updated for commit b0338da): https://docusaurus-openapi-36b86--pr1625-d0qqpasx.web.app (expires Fri, 16 Oct 2026 17:06:25 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: bf293780ee827f578864d92193b8c2866acd459f |
📸 Visual Diff ReportSnapshot comparison against https://docusaurus-openapi.tryingpan.dev/
✅ No visual regressions detected. Updated at 2026-10-09T17:11:41.961Z · run 37963482800 |
sserrata
added a commit
that referenced
this pull request
Oct 12, 2026
* fix(explorer): send exploded header array items as typed For a simple-style header array with explode: true, setHeaders added each item after passing it through tryDecodeJsonParam, so any value that is not valid JSON (for example "a") was sent as "false". Add the raw items instead, and only decode JSON for non-array values. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(explorer): add buildPostmanRequest unit tests Cover query, header, path, and cookie parameter serialization (including the exploded scalar cases fixed in #1625), authentication schemes, server variables, and request bodies. Map the theme's @theme/* alias in the Jest config, through globals["ts-jest"] because ts-jest 27 ignores transformer options, so theme modules that import through the alias can be tested. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(explorer): drop explanatory comment from buildPostmanRequest tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This branch had an error being deployed
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.
In
buildPostmanRequest, a query parameter declaredexplode: truewhose value is not a JSON object falls into the exploded-object branch ofsetQueryParams, which enumerates a non-object: the typed value becomes an empty string in the request and the code snippet, sostatus=availablegoes out asstatus=. The header branch throws on a decodednull.A scalar has nothing to explode, so the non-object case now falls through to the scalar handling; the header guard checks for
null.Verified by driving the built module across all four locations and both explode settings: 6 of 34 cases wrong on main, 34 of 34 after.
yarn testandyarn buildpass; Lint and Cypress fail on main today regardless.