Closed pspeter3 closed 10 years ago
+1 Very cool! Although, I think this is less so up to Feathersjs and more of an implementation by the developer/user in the Services.
I ultimately agree, I just wasn't sure if feathers was doing any sort of transformation on the data from the services
I just wasn't sure if feathers was doing any sort of transformation on the data from the services
@daffl @ekryski could either of you comment on this, I would say Feathers is not however I am not absolutely sure. Thanks!
Nope, not messing with your data in any way. But you could build a plugin using feathers-hooks to pre- and post process it according to the JSON API spec.
I'm all up for making the service integrations more RESTful (Hypermedia, better content types etc.). I think that's one of the big strength for the way Feathers does services. Your API will get better with future releases without you having to change anything.
Ya I agree with the approach of letting the developer do it. I think there are so many different ways that people might want their JSON to look (performance, readability, etc) that I don't want to enforce any specific format by default.
A plugin would be the best way I think.
Thanks, I think the hooks way is the best as well.
For other people looking for this, the REST service layer was extracted out to this project: https://github.com/feathersjs/feathers-rest So a JSON API service layer could be built in a similar fashion.
Any idea whether someone has done this in the end, and where to get the result? Cheers!
@berlincount we decided to consciously not implement this yet. At the time the JSON API spec was still changing a lot. I'm not sure how stable it is now even (I stopped following it super close). Personally, we also feel that it can be a bit bloated at times. The biggest thing we are missing is automatic API discovery and we have an issue for that here: https://github.com/feathersjs/feathers-rest/issues/2.
Let's continue any further discussion over there.
Another tricky question is how this would work over Sockets. The spec only really targets HTTP as far as I know. If anybody would like to discuss this more, feel free to open a new issue in https://github.com/feathersjs/feathers-rest. We should keep track of ideas and it would be awesome if somebody would be interested in taking this on.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue with a link to this issue for related bugs.
http://jsonapi.org/
This seems like a reasonable API format to support. What do you think?