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
Hey @marcuslange this is in my opinion not a bug. As the reference documentation mentions here, the library implements a really simple approach at the moment to evaluate the class property of a Siren entity (means, evaluating the @Relation annotation is not supported through the implementation).
Additionally it is not yet clear to me if the @Relation annotation should in general be used as a basis to evaluate the class property of a Siren entity.
We will think about how to support this use case. In the meantime you are able to provide a custom implementation of the SirenEntityClassProvider SPI as a @Bean to let the library pick up and use it.
It looks like Spring HATEOAS AnnotationLinkRelationProvider or Spring Core AnnotatedElementUtils are your friends if you want to implement a fast and easy first solution. :)
ingogriebsch
changed the title
@Relation annotation is not reflected in response
The @Relation annotation should be respected if evaluating the 'class' property of a Siren entity
Aug 23, 2021
Describe the bug
@relation annotation is not reflected in response.
To Reproduce
Add @relation to a RepresentationModel and request object.
Expected behavior
@relation(itemRelation = "Person") should produce "class": ["Person"]
Environment:
The text was updated successfully, but these errors were encountered: