Skip to content

Are collections required to be ordered? #104

@gabrielgrant

Description

@gabrielgrant

The patch in #91, by using a patch path including a zero-based index into the returned results from a GET, seems to formalize the notion that collections are ordered.

Are collections required to be ordered? Even if so, not referencing the record by ID seems to be begging for race conditions. What if a new document is inserted earlier in the collection between a GET request and it's corresponding PATCH?

At the bottom of "Updating a Document (PATCH)" > "To-Many Relationships" it is made explicit that "to-many relationships have set-like behavior in JSON API to limit the damage that can be caused by concurrent modifications." It seems collections should behave the same way, but instead collections are repeatedly referred to as "arrays" or "lists" (implying order) in the "singular resources" and "resource collections" sections.

Mind clarifying?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy