Skip to content

Related endpoints for STI resources do not yield proper types #772

Open
@alexssung

Description

@alexssung

Following up on #507

Given a model Animal with subclasses Cat and Dog, types get returned properly when querying directly for animals - e.g. hitting endpoint "api/animals" responds with types "cats" and "dogs" in the payload.

However, this behavior is not consistent when hitting the related endpoints of a resource - e.g. hitting "api/zoos/7/animals" responds with only type "animals" in the payload.

Currently, I am including "type" in the attributes object, which raises a warning and also breaks the JSON API specs. Is there a better workaround for this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions