I've defined the following Resource:
class CommentResource < BaseResource
has_one :activity
has_one :user
end
class ActivityResource < BaseResource
has_many :comments
end
jsonapi_resources :activities, only: %w(index show)
jsonapi_resources :comments, only: %w(create destroy index show)
And checking with rake routes I see that it also created all the relationship/related routes for both Activity and Comment even if I haven't added jsonapi_links / jsonapi_related_resources in the routes file
I've defined the following Resource:
And checking with
rake routesI see that it also created all the relationship/related routes for both Activity and Comment even if I haven't addedjsonapi_links/jsonapi_related_resourcesin the routes file