Skip to content

Updated Expression Patterns to allow brackets - #939

Merged
kdavisk6 merged 2 commits into
OpenFeign:masterfrom
kdavisk6:gh-928-relax-expression-pattern
Apr 28, 2019
Merged

kdavisk6 merged 2 commits into
OpenFeign:masterfrom
kdavisk6:gh-928-relax-expression-pattern

Conversation

@kdavisk6

@kdavisk6 kdavisk6 commented Apr 8, 2019

Copy link
Copy Markdown
Member

Fixes #928

Relaxed the regular expression that is used to determine if a given
value is an Expression per the URI Template Spec RFC 6570. We already
deviated by allowing dashes to exist without pct-encoding, this change
adds braces [] to this list.

Also included is the ability to set Collection Format per Query, overriding
the Template default. This allows for mixed Collection formats in the
same template and provides a way for Contract extensions to determine
which expansion type they want when parsing a contract.

Fixes OpenFeign#928

Relaxed the regular expression that is used to determine if a given
value is an Expression per the URI Template Spec RFC 6570.  We already
deviated by allowing dashes to exist without pct-encoding, this change
adds braces `[]` to this list.

Also included is the ability to set Collection Format per Query, overriding
the Template default.  This allows for mixed Collection formats in the
same template and provides a way for Contract extensions to determine
which expansion type they want when parsing a contract.
@kdavisk6 kdavisk6 added the bug Unexpected or incorrect behavior label Apr 8, 2019
@kdavisk6
kdavisk6 requested a review from velo April 8, 2019 22:11

@OlgaMaciaszek OlgaMaciaszek left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good, have tested on the example that caused the issue and it works well with this change.

@kdavisk6
kdavisk6 merged commit 318fb0e into OpenFeign:master Apr 28, 2019
@kdavisk6
kdavisk6 deleted the gh-928-relax-expression-pattern branch April 28, 2019 19:38
@kdavisk6 kdavisk6 added this to the 10.2.1 milestone Apr 28, 2019
velo pushed a commit that referenced this pull request Oct 7, 2024
* Updated Expression Patterns to allow brackets

Fixes #928

Relaxed the regular expression that is used to determine if a given
value is an Expression per the URI Template Spec RFC 6570.  We already
deviated by allowing dashes to exist without pct-encoding, this change
adds braces `[]` to this list.

Also included is the ability to set Collection Format per Query, overriding
the Template default.  This allows for mixed Collection formats in the
same template and provides a way for Contract extensions to determine
which expansion type they want when parsing a contract.

* Fixing Formatting
velo pushed a commit that referenced this pull request Oct 8, 2024
* Updated Expression Patterns to allow brackets

Fixes #928

Relaxed the regular expression that is used to determine if a given
value is an Expression per the URI Template Spec RFC 6570.  We already
deviated by allowing dashes to exist without pct-encoding, this change
adds braces `[]` to this list.

Also included is the ability to set Collection Format per Query, overriding
the Template default.  This allows for mixed Collection formats in the
same template and provides a way for Contract extensions to determine
which expansion type they want when parsing a contract.

* Fixing Formatting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Unexpected or incorrect behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set request parameter templates with [] inside do not pass Expressions matching check

2 participants