You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support limited subset of RFC 6570 syntax including operators "", "?", "/", "#" [SPR-14134] #18706
in: webIssues in web modules (web, webmvc, webflux, websocket)status: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement
We've already looked into supporting RFC 6570. It's very extensive and arguably well beyond most needs. Even the spec recognizes that and defines itself in terms of 4 levels (section 1.2). Moreover there are significant differences in the way Spring's URI template support works and we've made a conscious decision not to change the mechanisms in place but rather evolve them as needed, i.e. not seeking compliance with the spec. You can see more comments on that.
Note that the RestTemplate does have a UriTemplateHandler extension point which allows you to completely replace the URI template handling for example swapping out our URI template support with another from an external library that supports RFC 6570.
That said we can consider specific features and enhancements around Spring's URI template handling. That would mean a separate ticket with a more specific request for enhancement.
In the REST scenario we have we had a ressource like Customer. The URI design looks like the following (using RFC 6570 syntax), which follows common best practices from all I can tell:
We can consider an alternative UriTemplateHandler that supports a limited subset of the RFC based on the given list of operators. Probably taking a similar approach as in the Spring HATEOAS UriTemplate, resolving what variables should be added from expressions and then building the URI with UriComponentsBuilder. The main difference is that it would be packaged as a UriTemplateHandler and available to plug into the RestTemplate.
in: webIssues in web modules (web, webmvc, webflux, websocket)status: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement
Activity
spring-projects-issues commentedon Apr 8, 2016
Rossen Stoyanchev commented
We've already looked into supporting RFC 6570. It's very extensive and arguably well beyond most needs. Even the spec recognizes that and defines itself in terms of 4 levels (section 1.2). Moreover there are significant differences in the way Spring's URI template support works and we've made a conscious decision not to change the mechanisms in place but rather evolve them as needed, i.e. not seeking compliance with the spec. You can see more comments on that.
Note that the RestTemplate does have a UriTemplateHandler extension point which allows you to completely replace the URI template handling for example swapping out our URI template support with another from an external library that supports RFC 6570.
That said we can consider specific features and enhancements around Spring's URI template handling. That would mean a separate ticket with a more specific request for enhancement.
spring-projects-issues commentedon Apr 8, 2016
Stefan Kühnel commented
Hello
@RossenStoyanchev,thanks for the update and the links.
In the REST scenario we have we had a ressource like Customer. The URI design looks like the following (using RFC 6570 syntax), which follows common best practices from all I can tell:
This is very similar to what Spring Data Rest does (e.g. https://spring.io/guides/gs/accessing-data-rest/), but we want some more control.
For a client side wrapper of the ressource, it could look something like the following:
This looks very simple to me: Always the same URI template. The correct URI would be created "automagically" depending on the given
urlVariables.For this to work the types as used in UriTemplate of Spring HATEOAS (
"", "?", "/", "#") are sufficient IMHO.spring-projects-issues commentedon Apr 11, 2016
Rossen Stoyanchev commented
We can consider an alternative
UriTemplateHandlerthat supports a limited subset of the RFC based on the given list of operators. Probably taking a similar approach as in the Spring HATEOASUriTemplate, resolving what variables should be added from expressions and then building the URI with UriComponentsBuilder. The main difference is that it would be packaged as aUriTemplateHandlerand available to plug into theRestTemplate.spring-projects-issues commentedon Apr 11, 2016
Stefan Kühnel commented
Thanks, Rossen, this sounds very good to me. :-)
bclozel commentedon Oct 23, 2026
Declining this issue due to lack of demand from community.