@Bean
public CurieProvider curieProvider() {
return new DefaultCurieProvider(HashMap.ofEntries(
Tuple.of("h3h3", new UriTemplate("http://localhost:8080/rest-api#{rel}")),
Tuple.of("h4h4", new UriTemplate("http://localhost:8080/rest-api#{rel}-revision")))
.toJavaMap(), "h3h3");
}
With resources annotated like this:
@Relation(value = "h3h3:lineup", collectionRelation = "h3h3:lineups")
public class LineupResource extends ResourceSupport {}
@Relation(value = "h3h3:thing", collectionRelation = "h3h3:things")
public class ThingResource extends ResourceSupport {}
I am trying to use multiple curies like this:
With resources annotated like this:
For collections this scenario works perfectly fine. But in case of GET on single resource curies section is missing in response payload because CurieProvider.getNamespacedRelFrom is equal to my link rel: https://github.com/spring-projects/spring-hateoas/blob/6bed9bec403f2ca45f4fd319c6ee3d79738f36f7/src/main/java/org/springframework/hateoas/hal/Jackson2HalModule.java#L174
Get response:
Is it intended behavior?