Repository navigation
Adding Support for Query Parameter Name Expansion - #841
Merged
Merged
Conversation
Fixes #838 `QueryTemplate` assumed that all query names were literals. This change adds support for Expressions in Query Parameter names, providing better adherence to RFC 6570. RequestLines such as `@RequestLine("GET /uri?{parameter}={value}")` are now fully expanded whereas before, only `{value}` would be.
velo
approved these changes
Nov 14, 2018
| CollectionFormat collectionFormat) { | ||
| super(template, false, true, true, charset); | ||
| this.name = name; | ||
| this.name = new Template(name, false, true, false, charset); |
Member
There was a problem hiding this comment.
At some point we should replace this booleans with enums that communicate what is going on..
new Template(name, Resolution.REQUIRED, Encoding.REQUIRED, Encoding.DISABLED, charset);
Not a problem for today
These new enums replace the boolean values used to control encoding and expression expansion options in Templates
Expressions in Query Parameter names and in a Body Template will now no longer be removed if they are not resolved. For Query Template, this change will prevent invalid query name/value pairs from being generated. For the Body Template, the documentation states that unresolved should be preserved, yet the code did not match.
velo
pushed a commit
that referenced
this pull request
Oct 7, 2024
* Adding Support for Query Parameter Name Expansion Fixes #838 `QueryTemplate` assumed that all query names were literals. This change adds support for Expressions in Query Parameter names, providing better adherence to RFC 6570. RequestLines such as `@RequestLine("GET /uri?{parameter}={value}")` are now fully expanded whereas before, only `{value}` would be. * Adding Encoding and Resolution Enums for Template Control These new enums replace the boolean values used to control encoding and expression expansion options in Templates * Allow unresolved expressions in Query Parameter Name and Body Template Expressions in Query Parameter names and in a Body Template will now no longer be removed if they are not resolved. For Query Template, this change will prevent invalid query name/value pairs from being generated. For the Body Template, the documentation states that unresolved should be preserved, yet the code did not match.
velo
pushed a commit
that referenced
this pull request
Oct 8, 2024
* Adding Support for Query Parameter Name Expansion Fixes #838 `QueryTemplate` assumed that all query names were literals. This change adds support for Expressions in Query Parameter names, providing better adherence to RFC 6570. RequestLines such as `@RequestLine("GET /uri?{parameter}={value}")` are now fully expanded whereas before, only `{value}` would be. * Adding Encoding and Resolution Enums for Template Control These new enums replace the boolean values used to control encoding and expression expansion options in Templates * Allow unresolved expressions in Query Parameter Name and Body Template Expressions in Query Parameter names and in a Body Template will now no longer be removed if they are not resolved. For Query Template, this change will prevent invalid query name/value pairs from being generated. For the Body Template, the documentation states that unresolved should be preserved, yet the code did not match.
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.
Fixes #838
QueryTemplateassumed that all query names were literals. This changeadds support for Expressions in Query Parameter names, providing better
adherence to RFC 6570.
RequestLines such as
@RequestLine("GET /uri?{parameter}={value}")arenow fully expanded whereas before, only
{value}would be.