When I have the following setup
routes.rb
namespace :namespace do
jsonapi_resources :animals
jsonapi_resources :farms do
jsonapi_resources :animals
end
end
resources/namespace/animal_resource.rb
class Namespace::AnimalResource < JSONAPI::Resource
immutable
end
resources/namespace/cat_resource.rb
class Namespace::CatResource < Namespace::AnimalResource
end
When making a request to /namespace/animal-resources/5 the type is cat as it should be according to https://github.com/cerebris/jsonapi-resources#immutable-heterogeneous-collections
however, when making a request to /namespace/farms/1/animal-resources/5 the type is animal, but it should be cat
This seems to be a bug, any thoughts?
When I have the following setup
routes.rb
resources/namespace/animal_resource.rb
resources/namespace/cat_resource.rb
When making a request to
/namespace/animal-resources/5the type iscatas it should be according to https://github.com/cerebris/jsonapi-resources#immutable-heterogeneous-collectionshowever, when making a request to
/namespace/farms/1/animal-resources/5the type isanimal, but it should becatThis seems to be a bug, any thoughts?