You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are times when properties can only be set when creating an entity or updating an entity, but cannot be retrieved. An example of this would be a password, which can be set through the API but not read.
We have capabilities for saying that a property can not be specified on creation (InsertRestrictions.NonInsertableProperties) or can not be specified on update (UpdateRestrictions.NonUpdatableProperties), and we have SelectSupportType for describing select capabilities, but we don't have any way to say a particular property cannot be read (there is no NonSelectableProperties).
Proposal
1a. Add NonSelectableProperties to SelectSupportType in the capabilities spec:
<PropertyName="NonSelectableProperties"Type="Collection(Edm.PropertyPath)"Nullable="false">
<AnnotationTerm="Core.Description"String="These structural properties cannot be specified in a select statement." />
</Property>
1b. Alternatively, if we believe that read/write is a fundamental characteristic of the property, rather than a capability of the service, we could add a model annotation to the core vocabulary for specifying the readability/writeability of a property:
<TermName="PropertyUsage"Type="Core.PropertyUsageType"DefaultValue="Create Read Update"Targets="property">
<AnnotationTerm="Core.Description"String="Specifies whether the target property is intended for use in a create, read, or update operation." />
</Term>
<EnumTypeName="PropertyUsageType"IsFlags="true">
<MemberName="Create"Value=1>
<AnnotationTerm="Core.Description"String="The annotated property can be used in a Create operation." />
</Member>
<MemberName="Read"Value=2>
<AnnotationTerm="Core.Description"String="The annotated property can be read." />
</Member>
<MemberName="Update"Value=4>
<AnnotationTerm="Core.Description"String="The annotated value can be updated." />
</Member>
</EnumType>
Add "Omitted" term to OData Core vocabulary used as an instance annotation to describe properties omitted from the payload:
<TermName="Omitted"Type="Edm.String">
<AnnotationTerm="Core.Description"String="The annotated property in a request or response payload was omitted for the specified reason." />
</Term>
There are times when properties can only be set when creating an entity or updating an entity, but cannot be retrieved. An example of this would be a password, which can be set through the API but not read.
We have capabilities for saying that a property can not be specified on creation (InsertRestrictions.NonInsertableProperties) or can not be specified on update (UpdateRestrictions.NonUpdatableProperties), and we have SelectSupportType for describing select capabilities, but we don't have any way to say a particular property cannot be read (there is no NonSelectableProperties).
Proposal
1a. Add NonSelectableProperties to SelectSupportType in the capabilities spec:
1b. Alternatively, if we believe that read/write is a fundamental characteristic of the property, rather than a capability of the service, we could add a model annotation to the core vocabulary for specifying the readability/writeability of a property:
Imported from ODATA-1614
The text was updated successfully, but these errors were encountered: