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: instance annotations


Hello Mike,

 

It is mostly for documentation purposes but maybe in the future for tools to validate that a Term is associated with the right model element.

An example (that doesn’t apply to instance annotations) would be the RSDL -> CSDL transformation that could give a warning if an AlternateKeys annotation is put on a structural property since this would have not the intended effect.

 

If AppliesTo is *not* intended to be restrictive,  that is ok, I guess I misunderstood that. I guess that is why  AppliesTo is not mandatory.

 

Christof

 

From: Michael Pizzo <mikep@microsoft.com>
Sent: Saturday, February 20, 2021 11:01
To: Christof Sprenger <chrispre@microsoft.com>
Cc: odata@lists.oasis-open.org
Subject: RE: instance annotations

 

We don't currently have a way to specify that an annotation term is intended for use as an instance annotation – to my recollection, it has never come up.

 

How would this information be useful to the client?  Is it just a matter of documenting how the term is intended to be used, or is it required at runtime in order to invoke some type of logic?

 

If it's part of documenting the usage, then we generally try to convey that in the description – having a machine-readable way to determine if a term is intended as an instance annotation is useful if code needs to determine applicability.

 

For comparison, the AppliesTo attribute for metadata annotations is intended to help schema designers know where they can put what terms (i.e., you can have a drop-down of terms that are applicable to a particular model element without having to understand the semantics of the term.)  AppliesTo is *not* intended to be restrictive (i.e., clients should not throw an error if a term is used somewhere that is not called out in AppliesTo).

 

Similarly, clients should never error due to an unexpected/unknown instance annotation, so I wouldn't add a way to distinguish a term as intended for an instance annotation in order to add client validation.

 

From: odata@lists.oasis-open.org <odata@lists.oasis-open.org> On Behalf Of Christof Sprenger
Sent: Thursday, February 18, 2021 2:58 PM
To: odata@lists.oasis-open.org
Subject: [EXTERNAL] [odata] instance annotations

 

Hello,

 

I would have expected to find something in the annotation term applicability table that allows me to specify that an annotation is intended as an instance annotation.

 

OData Common Schema Definition Language (CSDL) XML Representation Version 4.01 (oasis-open.org)

 

Am I misunderstanding something how a term is supposed to be defined that can be used as an instance annotation? Or is this a gap in the standard?

 

Christof



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