Skip to content

How to validate pagination link in relationship objects? #21

Closed
@Art4

Description

@Art4

@fcastillo-es commented 6. Nov. 2015 10:57 MEZ:

There's one thing in the json-api documentation I don't feel totally ok with. It states that pagination likns MUST appear in the link objects that correspond to a collection. The only way to validate that it's a collection is checking if data is an array, but a relationship MUST contain at least one of links, data and meta. So if there can be a relationship with no data, we can't validate that the pagination refers to a collection.

I'm not sure in this case if it wold be worth it check if there is data to validate it as array to allow pagination. What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions