Thanks for the response Mike. What if I want to snakecase params and 
camelcase out params? Do you happen to know if any of those can do that.

Unfortunately JSON API Resources will not work by just using sequel-rails. 
It's heavily coupled to activerecord and all the assumptions that AR makes 
about joins, filtering, association CRUD, operations, etc. I'm refactoring 
it now to get it to work. Looking at other libraries, they don't seem to 
support Sequel although they say they are decoupled from an ORM, so an 
adapter will have to be written for them also.

Ultimately I wanted to try writing an adapter for a project that has 
traction and right now, JSON API Resources has a lot of forks, watchers, 
and activity, so I'm much more likely to bump into others using it and 
thats an important indicator in the early days when there are many 
scattered libraries.

To support Sequel, it would be great if whoever reading this could +1 or 
thumbs up this post so that the maintainers are more likely to help me get 
my PR merged:

https://github.com/cerebris/jsonapi-resources/issues/1006

Thanks!

On Friday, March 24, 2017 at 7:52:29 AM UTC-7, Mike Pastore wrote:
>
> 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