Other Representations

Sometimes though you may want to extend or change the representations generated. This might be because you want to write a RESTful client that uses a particular library (say a JavaScript library or web components) that can only handle representations in a certain form.

Or, you might want to have Apache Isis generate representations according to some other "standard", of which there are many:

  • Mike Kelly’s HAL specification

  • Mike Amundsen’s Collection+JSON specification

  • Kevin Swiber’s Siren specification

  • Steve Klabnik’s JSON API specification

  • Gregg Cainus' Hyper+JSON specification

  • the W3C’s JSON-LD specification

  • Markus Lanthaler’s Hydra specification.

A good discussion about the relative merits of several of these different hypermedia formats can be found here.

Or, of course, you may have your own internal specification that you wish to use.

Supporting any of these alternative representations can be achieved by providing a suitable implementation of ContentNegotiationService. The existing implementations can be used as a starting point.

Any custom implementations will need to access the internal APIs for the Apache Isis metamodel. You should be aware that these are not formal API.