fix(explorer): encode RFC 3986 reserved chars in query parameter values#1366
Merged
fix(explorer): encode RFC 3986 reserved chars in query parameter values#1366
Conversation
|
Size Change: +3.08 kB (+0.14%) Total Size: 2.21 MB
ℹ️ View Unchanged
|
|
Visit the preview URL for this PR (updated for commit 8dfb121): https://docusaurus-openapi-36b86--pr1366-3gmrbigi.web.app (expires Wed, 29 Apr 2026 18:32:35 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: bf293780ee827f578864d92193b8c2866acd459f |
Replaces the manual space-only encoding with encodeURIComponent for query parameters, so reserved characters like ':' are correctly percent-encoded (e.g. ':' → '%3A') when building request URLs. Path parameters retain the existing whitespace-only encoding since they are handled separately downstream in setPathParams. Closes #1312
5932d60 to
aa6a722
Compare
…lization Adds two endpoints to visually verify that reserved characters like ':', '/', and '#' are percent-encoded in query parameter values. Related to #1312
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
replace(/\s/g, "%20")), leaving RFC 3986 reserved characters like:unencoded in request URLsencodeURIComponentforqueryparameters, which correctly percent-encodes all reserved characters (e.g.:→%3A)setPathParamsand changing them is out of scopeTest plan
:(e.g.foo:bar) in the Try It panel — confirm the request URL showsfoo%3Abar%20/,?,#,@) are encoded correctlyCloses #1312
🤖 Generated with Claude Code