dreamfactorysoftware / dreamfactory

DreamFactory API Management Platform
https://www.dreamfactory.com
Apache License 2.0
1.53k stars 311 forks source link

Support HATEOAS #139

Open mfulton26 opened 7 years ago

mfulton26 commented 7 years ago

It would be great if the response body to API calls returned links to other pertinent resources using clearly defined link relation types. Swagger is nice for experimenting with a set of APIs but I like to constrain my web services to use hypermedia as the engine of application state (HATEOAS).

From Representational state transfer - Wikipedia:

Having accessed an initial URI for the REST application—analogous to a human Web user accessing the home page of a website—a REST client should then be able to use server-provided links dynamically to discover all the available actions and resources it needs. As access proceeds, the server responds with text that includes hyperlinks to other actions that are currently available. There is no need for the client to be hard-coded with information regarding the structure or dynamics of the REST service.

More details here.

drewpearce commented 7 years ago

Hi, @mfulton26. I spoke with the engineering team about this. It's something we will look into, but no ETA. Filed a feature request with reference # DF-1037

mfulton26 commented 7 years ago

Thank you!

mfulton26 commented 7 years ago

For anyone else that stumbles upon this issue and may be having a hard time understanding HATEOAS I came across the following article that I found useful: https://spring.io/understanding/HATEOAS.

jocooler commented 6 years ago

Just wanted to +1 on this; I've implemented a way to build the href URLs clientside but I think HATEOAS would be a great improvement for discovery in Dreamfactory.