I want my response to include this:
\"keyMaps\":{
\"href\":\"http://localhost/api/keyMaps{/keyMapId}\",
\"templated\":true
}
That\'s easy
With latest versions of spring-hateoas
you can do the following:
UriComponents uriComponents = UriComponentsBuilder.fromUri(linkBuilder.toUri()).build();
UriTemplate template = new UriTemplate(uriComponents.toUriString())
.with("keyMapId", TemplateVariable.SEGMENT);
will give you: http://localhost:8080/bla{/keyMapId}",