Skip to content

serializeAndPush requires jsonapi.version, but spec does not #291

@joelcox

Description

@joelcox

Right now the serializeAndPush checks the response for a { jsonapi: { version: * } fragment, even though the JSON API spec says the following:

A JSON:API document MAY include information about its implementation under a top level jsonapi member. If present, the value of the jsonapi member MUST be an object (a “jsonapi object”). The jsonapi object MAY contain a version member whose value is a string indicating the highest JSON API version supported.

My interpretation of this is that serializeAndPush is more strict than it should be, but I do understand this is probably included to inform users that this function is only compatible with a JSON API compliant API. An alternative would be to not return from this function, but just display the warning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions