OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

odata message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [OASIS Issue Tracker] (ODATA-1545) Allow services to validate read-only properties in payloads


Michael Pizzo created ODATA-1545:
------------------------------------

             Summary: Allow services to validate read-only properties in payloads
                 Key: ODATA-1545
                 URL: https://issues.oasis-open.org/browse/ODATA-1545
             Project: OASIS Open Data Protocol (OData) TC
          Issue Type: New Feature
          Components: Protocol
    Affects Versions: V4.01_OS
            Reporter: Michael Pizzo
             Fix For: V4.02_WD01


Section [11.4.3, Updating an Entity|https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_UpdateanEntity] states:Â
{code:java}
Key and other properties marked as read-only in metadata (including computed properties), as well as dependent properties that are not tied to key properties of the principal entity, can be omitted from the request. If the request contains a value for one of these properties, the service MUST ignore that value when applying the update. Services MUST return an error if an insert or update contains a new value for a property marked as updatable that cannot currently be changed by the user (i.e., given the state of the object or permissions of the user). The service MAY return success in this case if the specified value matches the value of the property. Clients SHOULD useÂPATCHÂand specify only those properties intended to be changed.
{code}
We defined the semantics this way because we wanted the ability to take a response payload, make some changes, and PUT it back without having to remove properties that were not updatable by the client.

We chose "ignore" because:
1) We wanted to ignore key properties because we wanted the ability to take a response payload from one service and use it to insert into another service.
2) We wanted to ignore computed properties because the computed value could change based on other properties in the payload or on external information.

However, "read-only" is not a strictly defined term â it refers generically to properties that can't be changed by the user and includes not only key and computed properties, but other read-only properties.

For other such read-only properties, it may be useful, and should be valid, for services to validate that the value of the read-only property matches the stored value and, if not, return an error.



--
This message was sent by Atlassian Jira
(v8.3.3#803004)


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]