Skip to content

meta['total'] is required by plug-in but not part of the JSON API spec #8

@GuyPaddock

Description

@GuyPaddock

We've run into an issue where this client is requiring a meta tag that contains a total value in the JSON response from the server. There is nothing in the JSON API spec that requires this, so the client should be able to gracefully recover when it's not provided OR provided some other way to plug-in code that provides the total record count (in case the server puts that total in a different, non-standard meta field).

I see that #1 was raised about something similar, though that issue is light on detail.

Also see JSON API - Examples:

Note: Putting a property like "total-pages" in "meta" can be a convenient way to indicate to clients the total number of pages in a collection (as opposed to the "last" link, which simply gives the URI of the last page). However, all "meta" values are implementation-specific, so you can call this member whatever you like ("total", "count", etc.) or not use it at all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions