-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[GH-1319] Add Support for Path Style Parameter Expansion #1537
[GH-1319] Add Support for Path Style Parameter Expansion #1537
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, it probably would be nice to have a Feign client example using this param expansion
Agreed. I'll update. I'm also going to export this expression as an |
Hi @kdavisk6 - thank you for working on this support! One project I'm working on has a use case where the server expects an optional Map of
Here are some expected expansions:
Would these use cases work, or could the current solution be extended to support them? |
We'll adhere to the URI template specification: the spec defines these use cases:
In the spec ,
|
8e925cc
to
c3cc97d
Compare
Fixes OpenFeign#1319 This change adds limited Path Style support to Feign URI template-style templates. Variable expressions that start with a semi-colon `;` are now expanded in accordance to [RFC 6570 Section 3.2.7](https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.7) with the following modifications: * Maps and Lists are expanded by default. * Only Single variable templates are supported. Examples: ``` {;who} ;who=fred {;half} ;half=50%25 {;empty} ;empty {;list} ;list=red;list=green;list=blue {;keys} ;semi=%3B;dot=.;comma=%2C ```
@kdavisk6 - thank you for the clarification and details pointing out the relevant details from the spec! It looks like the |
* [GH-1319] Add Support for Path Style Parameter Expansion Fixes #1319 This change adds limited Path Style support to Feign URI template-style templates. Variable expressions that start with a semi-colon `;` are now expanded in accordance to [RFC 6570 Section 3.2.7](https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.7) with the following modifications: * Maps and Lists are expanded by default. * Only Single variable templates are supported. Examples: ``` {;who} ;who=fred {;half} ;half=50%25 {;empty} ;empty {;list} ;list=red;list=green;list=blue {;keys} ;semi=%3B;dot=.;comma=%2C ``` * Export Path Style Expression as an Expander for use with custom contracts * Added example to ReadMe * Additional Test Cases.
* [GH-1319] Add Support for Path Style Parameter Expansion Fixes #1319 This change adds limited Path Style support to Feign URI template-style templates. Variable expressions that start with a semi-colon `;` are now expanded in accordance to [RFC 6570 Section 3.2.7](https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.7) with the following modifications: * Maps and Lists are expanded by default. * Only Single variable templates are supported. Examples: ``` {;who} ;who=fred {;half} ;half=50%25 {;empty} ;empty {;list} ;list=red;list=green;list=blue {;keys} ;semi=%3B;dot=.;comma=%2C ``` * Export Path Style Expression as an Expander for use with custom contracts * Added example to ReadMe * Additional Test Cases.
Fixes #1319
This change adds limited Path Style support to Feign URI template-style
templates. Variable expressions that start with a semi-colon
;
are now expanded in accordance to RFC 6570 Section 3.2.7
with the following modifications:
Examples: