Working through implementing includes I have discovered what appears to be a bug. All my other code like this works as expected and the only difference I can find is that the association is the same class as the requested object.
You will not there is no "included" section even though the relationships section clearly reflects the data.
class SerializableUser < JSONAPI::Serializable::Resource
type 'users'
belongs_to :role
belongs_to :parent
has_many :managers, class 'SerializableUser
has_many :direct_reports, class 'SerializableUser
end
The response looks nearly correct, except the includes are missing at the end. I have provided a sample below.
Working through implementing includes I have discovered what appears to be a bug. All my other code like this works as expected and the only difference I can find is that the association is the same class as the requested object.
You will not there is no "included" section even though the relationships section clearly reflects the data.
Controller
Serializer
The response looks nearly correct, except the includes are missing at the end. I have provided a sample below.