Adding a "remote" relationship in Katharsis?

133 Views Asked by At

I'm evaluating JSON-API and using Katharsis to implement a set of related API's as microservices, where one resource is in it's own deployable unit, and it may relate to other resources in other microservices or even external API's out of my control.

I understand that to relate two resources together, Katharsis needs to have two objects annotated with @JsonApiResource, and from one resource I add a property to the other and add a @JsonApiToOne or @JsonApiToMany. The result is Katharsis builds a self link which represents the relationship, and a related link to the other resource.

But what if I want to build a relationship to a resource that Katharsis knows nothing about? Stepping through the code there seems to be no way to do that without changing one of the core classes. I may not need a way to manage the relationship, just a way to navigate to the related resource.

I'm new to JSON-API and Katharsis so maybe I'm misunderstanding something or "doing it wrong"? Thanks!

0

There are 0 best solutions below