-
Notifications
You must be signed in to change notification settings - Fork 830
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
Immutables #589
base: gh-pages
Are you sure you want to change the base?
Immutables #589
Conversation
I think it would be better to use the term |
I'd say that "immutable" is okay, although it doesn't describe the state of the resource object but of its attributes here. And it's clear, that this is an information for the client only and that it doesn't limit the server in modifying the resource attributes. |
There's actually a term for this: "read-only". |
All words express the same and all still mean that the server can modify it anyway... :) |
Updated the PR:
|
Updated: added a clause about accuracy for client / resource / moment in time, similar to one in #590. |
@hhware perhaps this additional spec can be achieved using the meta section of the payload, rather than defining additional structure. I had considered something similar for "protected-attributes" as a sibling of "attributes" but the more I thought about it I'm happy with expressing that level of detail as meta content, see #575 (comment) |
@pixelhandler, this is what I initially thought about it (#575 (comment)), but then I concluded that it could have broader audience than just one API: |
Given that both attributes and relationships may be read-only, I'm opposed to a common bucket that could group both together purely from a structural perspective. I think it's also important to realize that immutability can be temporal, and that attributes that are read-only at the time of one request may be mutable at a later time due to a resource's change in state. |
But on the other hand, they share the namespace. IMHO, this is strong enough commonality to allow them to be listed together in a common bucket. I would no mind separating them in different sub-buckets though, if that helps.
Is not it an argument in favor of having such mechanism? Many things about resource can be temporal: its existence, its representation in any given response, immutability of some members. Temporal aspect can be handled via resource versioning. |
I think this could be very well solved using an extension available in v1.1. An extension does not require changes to base spec. This should allow experiments and quicker iteration than trying to add it to main spec. |
I like this 👍 |
Proposing support for members
immutable
in attempt to resolve #575.I am cutting corners here: this PR in its current form assumes that #588 is accepted, and hence should not go ahead of #588. I want to throw it in anyway because not so much time is left before 1.0.