1

I am using the Ruby gem JSONAPI::Resources, the model has quite a few related objects, and I don't want to expose all of them to be queried though the include option in URL.

localhost:3000/api/v1/posts?include=author but since there are are comments and ratings associated models. This also works

localhost:3000/api/v1/posts?include=comments

localhost:3000/api/v1/posts?include=ratings

Which is not a desirable effect. How can it be limited.

Thank in advance.

Babar
  • 1,202
  • 1
  • 12
  • 21

0 Answers0