Plans for JSON API compliant adaptor?

74 views
Skip to first unread message

Steven Harman

unread,
Dec 31, 2013, 2:06:25 PM12/31/13
to rails-a...@googlegroups.com
Hello all,
I've seen mention of being JSON API-compliant in a few places, but not much discussion about how this will be done. Perhaps we can kick that conversation off here? Questions:
  1. It's been mentioned that JSON API compliance should be achieved via an adaptor, so what is the status and/or design for adaptors?
  2. What are the specific things such an adaptor will need from AMS in order to be successful? (Two obvious things I could image are...)
    1. An interface to abstract away concepts like `links`, `attributes`, `entities` (`has_many` ?), `entity` (`has_one` ?), etc...
    2. Access to URL helpers (in Rails) to generate `links` and other URLs.
    3. A mechanism to declare the adaptor to be used, along with optional configuration.
There is also a list of things a JSON API adaptor will need to handle, like ensuring that even single resources are wrapped in an array, how to render URL- or ID-style JSON, mapping the `application/vnd.api+json` Internet Media Type Identifier, etc., but I would image we can hash those out once we have a plan of attack for the more systemic questions.

I'd be happy to help, including spiking some ideas, but would appreciate any input and context you have on the history and current direction of AMS.

Thanks!
Steven Harman

Santiago Pastorino

unread,
Dec 31, 2013, 2:27:31 PM12/31/13
to Steven Harman, rails-a...@googlegroups.com
Hey Steven,

  from my side all that I've said was after spending like 13 minutes of thinking about the problem ;). So probably doesn't worth even considering.

Besides from that I also said that I've already implemented JSON API compliance but in an extremely hacky way just as a PoC.

So I don't really have answers for all your questions until I have time to sit down and think about the problem not easy for me to do that in a couple of minutes ;).

A collaborative list of things needed to accomplish for JSON API compliance is extremely welcome, you can start a gist if you want and share it here. I will include that at some point in the Roadmap https://www.pivotaltracker.com/s/projects/978898

Thanks and happy new year!


--
You received this message because you are subscribed to the Google Groups "rails-api-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rails-api-cor...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages