Skip to content

DRF J-A renders nested serializers out of spec. #769

Closed
@bpleshakov

Description

@bpleshakov

Hi there.
Json-api spec states:

Attributes may contain any valid JSON value.

Complex data structures involving JSON objects and arrays are allowed as attribute values. However, any object that constitutes or is contained in an attribute MUST NOT contain a relationships or links member, as those members are reserved by this specification for future use.

Source: https://jsonapi.org/format/#document-resource-object-attributes

However, considering this and this any nested serializer would be rendered as resource relations even though the nested structure is not a resource.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions