Skip to content

Adding Support for Query Parameter Name Expansion - #841

Merged
velo merged 3 commits into
masterfrom
gh-838-query-name-expansion
Nov 15, 2018
Merged

velo merged 3 commits into
masterfrom
gh-838-query-name-expansion

Conversation

@kdavisk6

Copy link
Copy Markdown
Member

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.

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.
@kdavisk6
kdavisk6 requested a review from velo November 14, 2018 13:31

@velo velo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

CollectionFormat collectionFormat) {
super(template, false, true, true, charset);
this.name = name;
this.name = new Template(name, false, true, false, charset);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why wait? I’ll add it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

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
velo merged commit f16553d into master Nov 15, 2018
@velo
velo deleted the gh-838-query-name-expansion branch November 15, 2018 20:17
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.
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