-
Notifications
You must be signed in to change notification settings - Fork 16
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
add an optional "readOnly" property for items #12
Comments
There's a registered extension for this. I think the only thing to clarify here would be the name: |
yep, this is an attempt to move the extension into the main spec doc. i've found this extension very useful! so, onto the naming. i prefer not to introduce dashes into Cj since it adds some burden to parsing the JSON since "dashed" properties need to be addressed using brackets:
i am also ok w/ using all lower case:
finally, would love to hear from others using the extension. how do you feel about adding this to the spec? does changing the name cause enough problems to make a case for just leaving it as a "dashed" element? do you find the dash causing any added burden in parsing (as i claim)? or is it no big deal? |
Hi @mamund I'm already including extensions on the Ruby CJ::Serializer. For now, I'll add "read only" as an extension, and will later move it to the spec if it's finally merged. Just to clarify:
cheers |
well, we can't change the existing extension since others maybe depending
on it already.
i've not finally decided on whether to change to readonly or readOnly and
was hoping to hear from the author of the existing extension, too.
for now, go ahead and do a PR for a new extension and we can sort this out
shortly.
cool?
|
I'll rather wait until you decide on the name. It's not really an urgency. Let's ping @pmhsfelix and see what he's got to say ;-) |
add an optional
readOnly
property for items. This will make it easier for clients to know which items are eligible for update or deletion.readOnly="true"
: this item SHOULD NOT be edited using the supplied template and is not delete-ablereadOnly="false"
: this item MAY be edited using the supplied templateif the
readOnly
property is missing that item SHOULD be assumed to be eligible for edits and deletions.Document authors can still include entries in the
links
collection for each item that point to representations that include a template for use in editing (e.g.rel="edit"
orrel="delete"
). This will make it easier to indicate custom edit templates for individual items.This is a backward-compatible change. There is no breaking change to the format. Clients SHOULD already ignore properties they do not know.
The text was updated successfully, but these errors were encountered: