feathersjs / feathers

The API and real-time application framework
https://feathersjs.com
MIT License
15.08k stars 749 forks source link

JSON API support #63

Closed pspeter3 closed 10 years ago

pspeter3 commented 10 years ago

http://jsonapi.org/

This seems like a reasonable API format to support. What do you think?

Glavin001 commented 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.

pspeter3 commented 10 years ago

I ultimately agree, I just wasn't sure if feathers was doing any sort of transformation on the data from the services

Glavin001 commented 10 years ago

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!

daffl commented 10 years ago

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.

ekryski commented 10 years ago

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.

pspeter3 commented 10 years ago

Thanks, I think the hooks way is the best as well.

jokeyrhyme commented 8 years ago

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.

berlincount commented 8 years ago

Any idea whether someone has done this in the end, and where to get the result? Cheers!

ekryski commented 8 years ago

@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.

daffl commented 8 years ago

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.

lock[bot] commented 5 years ago

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.