Skip to content

support extension usage for relationship links #1650

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 3, 2022

Conversation

jelhan
Copy link
Contributor

@jelhan jelhan commented Aug 3, 2022

The current wording for updating relationships is too restrictive. Most noticeable it limits usage of extensions for endpoints used as relationship links.

For example, it forbids servers to support the atomic operations extensions on endpoints used for relationship links.

A server MUST respond to (...) POST, (...) requests to a URL from a to-many relationship link as described below.

For all request types, the body MUST contain a data member whose value is an empty array or an array of resource identifier objects.

This conflicts with atomic operations extension. The atomic operations extension specifies that a client may send a POST request with atomic:operations top-level member. The data top-level member must not be present. Supporting such a request on an endpoint used for relationship links as well would violate the specification if taking it by word.

This merge request changes the wording to allow extensions like atomic operations on these endpoints.

It does so by changing the wording to focus on the intend. It specifies how a request for updating relationships must look like. But does not put any constraints on other requests - even if using the same endpoint.

This aligns updating relationships with existing wording for creating, updating and deleting a resource.

Creating Resources

A resource can be created by sending a POST request to a URL that represents a collection of resources.

Updating Resources

A resource can be updated by sending a PATCH request to the URL that represents the resource.

Deleting Resources

An individual resource can be deleted by making a DELETE request to the resource’s URL:

@jelhan jelhan added the extension Related to existing and proposed extensions as well as extensions in general label Aug 3, 2022
@jelhan jelhan added this to the v1.1 milestone Aug 3, 2022
@jelhan jelhan requested a review from dgeb August 3, 2022 08:46
Copy link
Member

@dgeb dgeb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree on the basis of consistency and improved compat with extensions 💯

@dgeb dgeb merged commit 061bfd6 into gh-pages Aug 3, 2022
@dgeb dgeb deleted the support-extension-usage-for-relationship-links branch August 3, 2022 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension Related to existing and proposed extensions as well as extensions in general
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
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