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-893) Is @odata.type required on update of a derived type


     [ https://issues.oasis-open.org/browse/ODATA-893?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ralf Handl updated ODATA-893:
-----------------------------

       Assignee: Ralf Handl
    Environment: Applied
       Proposal: 
11.4.3 Update an Entity, paragraph 8: 

Entity id and entity type cannot be changed when updating an entity. However, format-specific rules can require providing entity id and entity type values in the payload when applying the update.

> Is @odata.type required on update of a derived type
> ---------------------------------------------------
>
>                 Key: ODATA-893
>                 URL: https://issues.oasis-open.org/browse/ODATA-893
>             Project: OASIS Open Data Protocol (OData) TC
>          Issue Type: Bug
>          Components: OData Protocol
>    Affects Versions: V4.0_ERRATA02
>         Environment: Applied
>            Reporter: Michael Pizzo
>            Assignee: Ralf Handl
>             Fix For: V4.0_ERRATA03
>
>
> The question came up recently as to whether the @odata.type attribute is required when updating a type derived from the type specified for a collection.
> Currently in the protocol spec we say: "The service ignores entity id and entity type values in the payload when applying the update."
> This was added to clarify that:
> 1) Clients couldn't change the type of an existing entity, and that
> 2) Services weren't required to validate that the type specified in the update was the same as the actual type of the object; it could just apply the values and returned an error if any properties were invalid.
> HOWEVER, in the JSON format specification we say that:
> "The odata.type annotation MUST appear in requests and in responses with minimal or full metadata, if the type cannot be heuristically determined, as described below, and one of the following is true:
> •         The type is derived from the type specified for the (collection of) entities or (collection of) complex type instances, or
> •         The type is for a property whose type is not declared in $metadata."
> And, in fact, some frameworks may require the type annotation in order to materialize an object of the correct type from the payload from which to apply the update.
> Either way, we should clarify the documents to be consistent.



--
This message was sent by Atlassian JIRA
(v6.2.2#6258)


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