[bug] Generate url with nested query params#19809
Draft
snewcomer wants to merge 1 commit intoemberjs:mainfrom
Draft
[bug] Generate url with nested query params#19809snewcomer wants to merge 1 commit intoemberjs:mainfrom
snewcomer wants to merge 1 commit intoemberjs:mainfrom
Conversation
Member
|
Is this still relevant? It is a draft PR |
sukima
reviewed
Mar 14, 2024
| return this.visit('/').then(() => { | ||
| let expectedURL = this.routerService.urlFor('parent.child', queryParams); | ||
|
|
||
| assert.equal('/child?filter=[user][name][$contains]=foo', expectedURL); |
Contributor
There was a problem hiding this comment.
question: This looks off. are we sure this is encoded correctly?
Per RFC3986:
If data for a URI component would conflict with a reserved character's purpose as a delimiter, then the conflicting data must be percent-encoded before the URI is formed.
And states that = is indeed a reserved character as a sub-delim. I'm a little confused how to parse this. Is filter the key to the key/value pair or is [user][name][$contains] or filter=[user][name][$contains] the key?
suggestion: per this SO answer a convention might be: ?filter[user][name][$contains]=foo instead.
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.
ref #19791
Blocked by tildeio/route-recognizer#175