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: RE: [odata] [OASIS Issue Tracker] (ODATA-1472) Clarify: PATCH should allow changing type on nested complex type


Sorry, I was a bit distracted.  This needs more discussion.

 

I would modify the resolution to say that changing the type of an embedded property can only be allowed if the new type is consistent with the type of the embedded property.

 

RedefinableElement::isConsistentWith()}

The query isConsistentWith() specifies, for any two Properties in a context in which redefinition is possible,

whether redefinition would be logically consistent. A redefining Property is consistent with a redefined

Property if the type of the redefining Property conforms to the type of the redefined Property, and the

multiplicity of the redefining Property (if specified) is contained in the multiplicity of the redefined Property.

 

pre: redefiningElement.isRedefinitionContextValid(self)

body: redefiningElement.oclIsKindOf(Property) and

let prop : Property = redefiningElement.oclAsType(Property) in

(prop.type.conformsTo(self.type) and

((prop.lowerBound()->notEmpty() and self.lowerBound()->notEmpty()) implies

prop.lowerBound() >= self.lowerBound()) and

((prop.upperBound()->notEmpty() and self.upperBound()->notEmpty()) implies

prop.lowerBound() <= self.lowerBound()) and

(self.isComposite implies prop.isComposite))

 

George

 

-----Original Message-----
From: odata@lists.oasis-open.org <odata@lists.oasis-open.org> On Behalf Of OASIS Issues Tracker
Sent: Thursday, September 16, 2021 11:03 AM
To: odata@lists.oasis-open.org
Subject: [odata] [OASIS Issue Tracker] (ODATA-1472) Clarify: PATCH should allow changing type on nested complex type

 

 

[EXTERNAL EMAIL]

 

Michael Pizzo created ODATA-1472:

------------------------------------

 

             Summary: Clarify: PATCH should allow changing type on nested complex type

                 Key: ODATA-1472

                 URL: https://urldefense.com/v3/__https://issues.oasis-open.org/browse/ODATA-1472__;!!LpKI!3QQgCvfU-ruu0YJSoumBHJ0-Q53ITWpwuM1TFTgQIB5JayiREQbW0ZYK3Y8bLXllqg$ [issues[.]oasis-open[.]org]

             Project: OASIS Open Data Protocol (OData) TC

          Issue Type: New Feature

          Components: Protocol

    Affects Versions: V4.01_OS

         Environment: Proposed

            Reporter: Michael Pizzo

             Fix For: V4.01_ERRATA01

 

 

We say that a PATCH request to an entity with a complex type in the payload also patches the nested complex type (i.e., it only affects the properties specified in the request).

 

We don't say whether or not the PATCH request can change the complex type of the nested property.

 

While changing the type of an entity should not be allowed (and is, in fact, explicitly prohibited) because entities define an *instance*, the type of a complex-typed property should be able to be changed in a PATCH request by specifying a new complex type (i.e., @odata.type) in the payload.

 

 

 

--

This message was sent by Atlassian Jira

(v8.3.3#803004)

 

---------------------------------------------------------------------

To unsubscribe from this mail list, you must leave the OASIS TC that generates this mail.  Follow this link to all your TCs in OASIS at:

https://urldefense.com/v3/__https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php__;!!LpKI!3QQgCvfU-ruu0YJSoumBHJ0-Q53ITWpwuM1TFTgQIB5JayiREQbW0ZYK3Y90T1UANA$ [oasis-open[.]org]

 

 

Internal Use - Confidential



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