Skip to content

fix(explorer): keep scalar query and header values on exploded parameters - #1625

Merged
sserrata merged 1 commit into
PaloAltoNetworks:mainfrom
lenamonj:explorer-exploded-scalar-query
Oct 9, 2026
Merged

sserrata merged 1 commit into
PaloAltoNetworks:mainfrom
lenamonj:explorer-exploded-scalar-query

Conversation

@lenamonj

@lenamonj lenamonj commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

In buildPostmanRequest, a query parameter declared explode: true whose value is not a JSON object falls into the exploded-object branch of setQueryParams, which enumerates a non-object: the typed value becomes an empty string in the request and the code snippet, so status=available goes out as status=. The header branch throws on a decoded null.

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 test and yarn build pass; Lint and Cypress fail on main today regardless.

…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.
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

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

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

📸 Visual Diff Report

Snapshot comparison against https://docusaurus-openapi.tryingpan.dev/

Total ✅ Match ❌ Diff ⏭ Skip
228 228 0 0

✅ No visual regressions detected.

Updated at 2026-10-09T17:11:41.961Z · run 37963482800

@sserrata
sserrata merged commit 10d3a54 into PaloAltoNetworks:main Oct 9, 2026
16 of 17 checks passed
@lenamonj
lenamonj deleted the explorer-exploded-scalar-query branch October 9, 2026 18:33
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

1 failed and 1 active deployments
preview — b0338da3 Deployed Oct 9, 2026 by sserrata via Visual Diff #2385
default — b0338da3 Deployed Sep 8, 2026 by lenamonj via Analyze Unsafe (javascript) #2351
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants