On Thursday, March 23, 2017 at 5:43:27 AM UTC-5, Aryk Grosz wrote:
>
> I was wondering what other people who want to build a JSON-API use in the 
> Sequel community?
>

Hi Aryk,

I've used JSONAPI::Serializers 
<https://github.com/fotinakis/jsonapi-serializers#readme> with Sequel with 
great success, as long as you disable its collection check when serializing 
single Sequel::Model instances (doc 
<https://github.com/fotinakis/jsonapi-serializers#sinatra-example>), and 
enable Sequel's :tactical_eager_loading plugin (doc 
<http://sequel.jeremyevans.net/rdoc-plugins/classes/Sequel/Plugins/TacticalEagerLoading.html>).
 
I wrote Sinja <https://github.com/mwpastore/sinja#readme> (and a Sinja 
extension <https://github.com/mwpastore/sinja-sequel#readme> for Sequel), 
which enables rapid development of {json:api}-compliant web services in 
Sinatra (and Sequel).

I've also been following along with the jsonapi-rb <http://jsonapi-rb.org> 
folks' efforts. They're doing some neat work that may one day allow the 
creation of something like Sinja with tighter coupling and deeper 
introspection between models, serializers, and controllers. Other 
interesting projects include JSONAPI::Utils 
<https://github.com/tiagopog/jsonapi-utils#readme>, JsonapiForRails 
<https://github.com/doga/jsonapi_for_rails#readme>, and JSONAPI Suite 
<https://jsonapi-suite.github.io/jsonapi_suite/>, all of which are 
implemented for/using Rails and either JSONAPI::Resources or jsonapi-rb. 
ActiveModelSerializers is still very popular as well.

If you're still interested in using Sequel with Rails and 
JSONAPI::Resources, a good place to start is with sequel-rails 
<https://github.com/TalentBox/sequel-rails#readme>. It essentially swaps 
out ActiveRecord/ActiveModel with Sequel, so JSONAPI::Resources will "just 
work," in theory. I didn't get very far with it myself, and it doesn't seem 
to be a popular use case, but I think it will get you at least 90% of the 
way there. 

Hope that helps!

Mike

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to