Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Expression Patterns to allow brackets #939

Merged
merged 2 commits into from Apr 28, 2019

Conversation

kdavisk6
Copy link
Member

@kdavisk6 kdavisk6 commented Apr 8, 2019

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.
Copy link

@OlgaMaciaszek OlgaMaciaszek left a comment

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
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