Closed bkuczenski closed 9 years ago
Note- this issue has been postponed until such time as AngularJS provides an easy mechanism to accept HATEOAS resources.
The interim solution will be to provide a list of links in response to a client requesting the api root, as in GET $WEB_ROOT/api
Should we use JSON-LD for this? https://en.wikipedia.org/wiki/JSON-LD
I don't remember what was the issue with AngularJS. If the JSON-LD format will simply add a few new properties to every resource, the angular web app could ignore those properties. I like the idea of using JSON-LD. It has W3C Recommendation, and it would support a data browser capable of processing JSON-LD.
won;t do any further work on this in this project- got 80% there
all resources returned by the API should inherit from a base Resource class that provides ContentType, Content, and Links fields. The Content should be whatever resource the API route is returning. then ContentType = typeof(content). content could also be, e.g., an HTTP error status.
Links can be populated based on ContentType and RouteData.