diff --git a/examples/Org.OData.JSON.V1.Schema-sample.json b/examples/Org.OData.JSON.V1.Schema-sample.json index 962d6fdb..32cf3079 100644 --- a/examples/Org.OData.JSON.V1.Schema-sample.json +++ b/examples/Org.OData.JSON.V1.Schema-sample.json @@ -19,6 +19,27 @@ } }, "json.schema.sample": { + "$Alias": "this", + "container": { + "$Kind": "EntityContainer", + "Employees": { + "$Collection": true, + "$Type": "this.Employee" + } + }, + "Employee": { + "$Kind": "EntityType", + "$Key": [ + "empid" + ], + "empid": { + "$Type": "Edm.Int32" + }, + "resume": { + "$Type": "JSON.JSON", + "$Nullable": true + } + }, "example": { "$Kind": "ComplexType", "CodeDictionary": { @@ -37,5 +58,6 @@ } } } - } + }, + "$EntityContainer": "json.schema.sample.container" } \ No newline at end of file diff --git a/examples/Org.OData.JSON.V1.Schema-sample.xml b/examples/Org.OData.JSON.V1.Schema-sample.xml index 6a7999b7..4cd067de 100644 --- a/examples/Org.OData.JSON.V1.Schema-sample.xml +++ b/examples/Org.OData.JSON.V1.Schema-sample.xml @@ -1,4 +1,4 @@ - + @@ -7,7 +7,19 @@ - + + + + + + + + + + + + + @@ -22,4 +34,4 @@ - \ No newline at end of file + diff --git a/vocabularies/Org.OData.Capabilities.V1.json b/vocabularies/Org.OData.Capabilities.V1.json index 1fca2030..501c149c 100644 --- a/vocabularies/Org.OData.Capabilities.V1.json +++ b/vocabularies/Org.OData.Capabilities.V1.json @@ -748,14 +748,20 @@ "UnsupportedExpressions": { "$Type": "Capabilities.SearchExpressions", "$DefaultValue": "none", - "@Core.Description": "Expressions not supported in $search" + "@Core.Description": "Expressions not supported in $search as specified by the standard syntax [OData-URL, section 5.1.8.1](https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part2-url-conventions.html#SearchExpressions)", + "@Core.LongDescription": "An unsupported expression may be treated as a term to be matched even if the\n standard syntax treats it as a keyword." + }, + "SearchSyntax": { + "$Nullable": true, + "@Core.IsURL": true, + "@Core.Description": "URL of the $search syntax supported by the service (null means the standard syntax [OData-URL, section 5.1.8.1](https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part2-url-conventions.html#SearchExpressions))" } }, "SearchExpressions": { "$Kind": "EnumType", "$IsFlags": true, "none": 0, - "none@Core.Description": "Single search term", + "none@Core.Description": "No unsupported expressions", "AND": 1, "AND@Core.Description": "Multiple search terms, optionally separated by `AND`", "OR": 2, diff --git a/vocabularies/Org.OData.Capabilities.V1.md b/vocabularies/Org.OData.Capabilities.V1.md index 7993b1f9..9a96e47c 100644 --- a/vocabularies/Org.OData.Capabilities.V1.md +++ b/vocabularies/Org.OData.Capabilities.V1.md @@ -71,22 +71,22 @@ Term|Type|Description [SortRestrictions](Org.OData.Capabilities.V1.xml#L506)|[SortRestrictionsType](#SortRestrictionsType)|Restrictions on orderby expressions [ExpandRestrictions](Org.OData.Capabilities.V1.xml#L532)|[ExpandRestrictionsType](#ExpandRestrictionsType)|Restrictions on expand expressions [SearchRestrictions](Org.OData.Capabilities.V1.xml#L562)|[SearchRestrictionsType](#SearchRestrictionsType)|Restrictions on search expressions -[KeyAsSegmentSupported](Org.OData.Capabilities.V1.xml#L600)|[Tag](Org.OData.Core.V1.md#Tag)|Supports [key-as-segment convention](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html#sec_KeyasSegmentConvention) for addressing entities within a collection -[QuerySegmentSupported](Org.OData.Capabilities.V1.xml#L604)|[Tag](Org.OData.Core.V1.md#Tag)|Supports [passing query options in the request body](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html#sec_PassingQueryOptionsintheRequestBody) -[InsertRestrictions](Org.OData.Capabilities.V1.xml#L610)|[InsertRestrictionsType](#InsertRestrictionsType)|Restrictions on insert operations -[DeepInsertSupport](Org.OData.Capabilities.V1.xml#L689)|[DeepInsertSupportType?](#DeepInsertSupportType)|Deep Insert Support of the annotated resource (the whole service, an entity set, or a collection-valued resource) -[UpdateRestrictions](Org.OData.Capabilities.V1.xml#L702)|[UpdateRestrictionsType](#UpdateRestrictionsType)|Restrictions on update operations -[DeepUpdateSupport](Org.OData.Capabilities.V1.xml#L788)|[DeepUpdateSupportType](#DeepUpdateSupportType)|Deep Update Support of the annotated resource (the whole service, an entity set, or a collection-valued resource) -[DeleteRestrictions](Org.OData.Capabilities.V1.xml#L801)|[DeleteRestrictionsType](#DeleteRestrictionsType)|Restrictions on delete operations -[CollectionPropertyRestrictions](Org.OData.Capabilities.V1.xml#L845)|\[[CollectionPropertyRestrictionsType](#CollectionPropertyRestrictionsType)\]|Describes restrictions on operations applied to collection-valued structural properties -[OperationRestrictions](Org.OData.Capabilities.V1.xml#L886)|[OperationRestrictionsType](#OperationRestrictionsType)|Restrictions for function or action operation -[AnnotationValuesInQuerySupported](Org.OData.Capabilities.V1.xml#L906)|[Tag](Org.OData.Core.V1.md#Tag)|Supports annotation values within system query options -[ModificationQueryOptions](Org.OData.Capabilities.V1.xml#L910)|[ModificationQueryOptionsType](#ModificationQueryOptionsType)|Support for query options with modification requests (insert, update, action invocation) -[ReadRestrictions](Org.OData.Capabilities.V1.xml#L934)|[ReadRestrictionsType](#ReadRestrictionsType)|Restrictions for retrieving a collection of entities, retrieving a singleton instance. -[CustomHeaders](Org.OData.Capabilities.V1.xml#L976)|\[[CustomParameter](#CustomParameter)\]|Custom headers that are supported/required for the annotated resource ([Example](Org.OData.Capabilities.V1.xml#L978)) -[CustomQueryOptions](Org.OData.Capabilities.V1.xml#L1002)|\[[CustomParameter](#CustomParameter)\]|Custom query options that are supported/required for the annotated resource ([Example](Org.OData.Capabilities.V1.xml#L1005))
If the entity container is annotated, the query option is supported/required by all resources in that container. -[MediaLocationUpdateSupported](Org.OData.Capabilities.V1.xml#L1054)|[Tag](Org.OData.Core.V1.md#Tag)|Stream property or media stream supports update of its media edit URL and/or media read URL -[DefaultCapabilities](Org.OData.Capabilities.V1.xml#L1059)|[DefaultCapabilitiesType](#DefaultCapabilitiesType)|Default capability settings for all collection-valued resources in the container

Annotating a specific capability term, which is included as property in DefaultCapabilitiesType, for a specific collection-valued resource overrides the default capability with the specified properties using PATCH semantics:

+[KeyAsSegmentSupported](Org.OData.Capabilities.V1.xml#L608)|[Tag](Org.OData.Core.V1.md#Tag)|Supports [key-as-segment convention](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html#sec_KeyasSegmentConvention) for addressing entities within a collection +[QuerySegmentSupported](Org.OData.Capabilities.V1.xml#L612)|[Tag](Org.OData.Core.V1.md#Tag)|Supports [passing query options in the request body](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html#sec_PassingQueryOptionsintheRequestBody) +[InsertRestrictions](Org.OData.Capabilities.V1.xml#L618)|[InsertRestrictionsType](#InsertRestrictionsType)|Restrictions on insert operations +[DeepInsertSupport](Org.OData.Capabilities.V1.xml#L697)|[DeepInsertSupportType?](#DeepInsertSupportType)|Deep Insert Support of the annotated resource (the whole service, an entity set, or a collection-valued resource) +[UpdateRestrictions](Org.OData.Capabilities.V1.xml#L710)|[UpdateRestrictionsType](#UpdateRestrictionsType)|Restrictions on update operations +[DeepUpdateSupport](Org.OData.Capabilities.V1.xml#L796)|[DeepUpdateSupportType](#DeepUpdateSupportType)|Deep Update Support of the annotated resource (the whole service, an entity set, or a collection-valued resource) +[DeleteRestrictions](Org.OData.Capabilities.V1.xml#L809)|[DeleteRestrictionsType](#DeleteRestrictionsType)|Restrictions on delete operations +[CollectionPropertyRestrictions](Org.OData.Capabilities.V1.xml#L853)|\[[CollectionPropertyRestrictionsType](#CollectionPropertyRestrictionsType)\]|Describes restrictions on operations applied to collection-valued structural properties +[OperationRestrictions](Org.OData.Capabilities.V1.xml#L894)|[OperationRestrictionsType](#OperationRestrictionsType)|Restrictions for function or action operation +[AnnotationValuesInQuerySupported](Org.OData.Capabilities.V1.xml#L914)|[Tag](Org.OData.Core.V1.md#Tag)|Supports annotation values within system query options +[ModificationQueryOptions](Org.OData.Capabilities.V1.xml#L918)|[ModificationQueryOptionsType](#ModificationQueryOptionsType)|Support for query options with modification requests (insert, update, action invocation) +[ReadRestrictions](Org.OData.Capabilities.V1.xml#L942)|[ReadRestrictionsType](#ReadRestrictionsType)|Restrictions for retrieving a collection of entities, retrieving a singleton instance. +[CustomHeaders](Org.OData.Capabilities.V1.xml#L984)|\[[CustomParameter](#CustomParameter)\]|Custom headers that are supported/required for the annotated resource ([Example](Org.OData.Capabilities.V1.xml#L986)) +[CustomQueryOptions](Org.OData.Capabilities.V1.xml#L1010)|\[[CustomParameter](#CustomParameter)\]|Custom query options that are supported/required for the annotated resource ([Example](Org.OData.Capabilities.V1.xml#L1013))
If the entity container is annotated, the query option is supported/required by all resources in that container. +[MediaLocationUpdateSupported](Org.OData.Capabilities.V1.xml#L1062)|[Tag](Org.OData.Core.V1.md#Tag)|Stream property or media stream supports update of its media edit URL and/or media read URL +[DefaultCapabilities](Org.OData.Capabilities.V1.xml#L1067)|[DefaultCapabilitiesType](#DefaultCapabilitiesType)|Default capability settings for all collection-valued resources in the container

Annotating a specific capability term, which is included as property in DefaultCapabilitiesType, for a specific collection-valued resource overrides the default capability with the specified properties using PATCH semantics:

## [ConformanceLevelType](Org.OData.Capabilities.V1.xml#L118) @@ -378,27 +378,28 @@ Property|Type|Description Property|Type|Description :-------|:---|:---------- [Searchable](Org.OData.Capabilities.V1.xml#L572)|Boolean|$search is supported -[UnsupportedExpressions](Org.OData.Capabilities.V1.xml#L575)|[SearchExpressions](#SearchExpressions)|Expressions not supported in $search +[UnsupportedExpressions](Org.OData.Capabilities.V1.xml#L575)|[SearchExpressions](#SearchExpressions)|Expressions not supported in $search as specified by the standard syntax [OData-URL, section 5.1.8.1](https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part2-url-conventions.html#SearchExpressions)
An unsupported expression may be treated as a term to be matched even if the standard syntax treats it as a keyword. +[SearchSyntax](Org.OData.Capabilities.V1.xml#L582)|URL?|URL of the $search syntax supported by the service (null means the standard syntax [OData-URL, section 5.1.8.1](https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part2-url-conventions.html#SearchExpressions)) **Applicable Annotation Terms:** - [Description](Org.OData.Core.V1.md#Description) -## [SearchExpressions](Org.OData.Capabilities.V1.xml#L579) +## [SearchExpressions](Org.OData.Capabilities.V1.xml#L587) Flag Member|Value|Description :-----|----:|:---------- -[none](Org.OData.Capabilities.V1.xml#L580)|0|Single search term -[AND](Org.OData.Capabilities.V1.xml#L583)|1|Multiple search terms, optionally separated by `AND` -[OR](Org.OData.Capabilities.V1.xml#L586)|2|Multiple search terms separated by `OR` -[NOT](Org.OData.Capabilities.V1.xml#L589)|4|Search terms preceded by `NOT` -[phrase](Org.OData.Capabilities.V1.xml#L592)|8|Search phrases enclosed in double quotes -[group](Org.OData.Capabilities.V1.xml#L595)|16|Precedence grouping of search expressions with parentheses +[none](Org.OData.Capabilities.V1.xml#L588)|0|No unsupported expressions +[AND](Org.OData.Capabilities.V1.xml#L591)|1|Multiple search terms, optionally separated by `AND` +[OR](Org.OData.Capabilities.V1.xml#L594)|2|Multiple search terms separated by `OR` +[NOT](Org.OData.Capabilities.V1.xml#L597)|4|Search terms preceded by `NOT` +[phrase](Org.OData.Capabilities.V1.xml#L600)|8|Search phrases enclosed in double quotes +[group](Org.OData.Capabilities.V1.xml#L603)|16|Precedence grouping of search expressions with parentheses -## [InsertRestrictionsBase](Org.OData.Capabilities.V1.xml#L614) +## [InsertRestrictionsBase](Org.OData.Capabilities.V1.xml#L622) **Derived Types:** @@ -406,65 +407,65 @@ Flag Member|Value|Description Property|Type|Description :-------|:---|:---------- -[Insertable](Org.OData.Capabilities.V1.xml#L615)|Boolean|Entities can be inserted -[MaxLevels](Org.OData.Capabilities.V1.xml#L618)|Int32|The maximum number of navigation properties that can be traversed when addressing the collection to insert into. A value of -1 indicates there is no restriction. -[TypecastSegmentSupported](Org.OData.Capabilities.V1.xml#L621)|Boolean|Entities of a specific derived type can be created by specifying a type-cast segment -[QueryOptions](Org.OData.Capabilities.V1.xml#L624)|[ModificationQueryOptionsType?](#ModificationQueryOptionsType)|Support for query options with insert requests -[CustomHeaders](Org.OData.Capabilities.V1.xml#L627)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom headers -[CustomQueryOptions](Org.OData.Capabilities.V1.xml#L630)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom query options -[Description](Org.OData.Capabilities.V1.xml#L633)|String?|A brief description of the request -[LongDescription](Org.OData.Capabilities.V1.xml#L637)|String?|A long description of the request -[ErrorResponses](Org.OData.Capabilities.V1.xml#L641)|\[[HttpResponse](#HttpResponse)\]|Possible error responses returned by the request. +[Insertable](Org.OData.Capabilities.V1.xml#L623)|Boolean|Entities can be inserted +[MaxLevels](Org.OData.Capabilities.V1.xml#L626)|Int32|The maximum number of navigation properties that can be traversed when addressing the collection to insert into. A value of -1 indicates there is no restriction. +[TypecastSegmentSupported](Org.OData.Capabilities.V1.xml#L629)|Boolean|Entities of a specific derived type can be created by specifying a type-cast segment +[QueryOptions](Org.OData.Capabilities.V1.xml#L632)|[ModificationQueryOptionsType?](#ModificationQueryOptionsType)|Support for query options with insert requests +[CustomHeaders](Org.OData.Capabilities.V1.xml#L635)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom headers +[CustomQueryOptions](Org.OData.Capabilities.V1.xml#L638)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom query options +[Description](Org.OData.Capabilities.V1.xml#L641)|String?|A brief description of the request +[LongDescription](Org.OData.Capabilities.V1.xml#L645)|String?|A long description of the request +[ErrorResponses](Org.OData.Capabilities.V1.xml#L649)|\[[HttpResponse](#HttpResponse)\]|Possible error responses returned by the request. -## [InsertRestrictionsType](Org.OData.Capabilities.V1.xml#L645): [InsertRestrictionsBase](#InsertRestrictionsBase) +## [InsertRestrictionsType](Org.OData.Capabilities.V1.xml#L653): [InsertRestrictionsBase](#InsertRestrictionsBase) Property|Type|Description :-------|:---|:---------- -[*Insertable*](Org.OData.Capabilities.V1.xml#L615)|Boolean|Entities can be inserted -[*MaxLevels*](Org.OData.Capabilities.V1.xml#L618)|Int32|The maximum number of navigation properties that can be traversed when addressing the collection to insert into. A value of -1 indicates there is no restriction. -[*TypecastSegmentSupported*](Org.OData.Capabilities.V1.xml#L621)|Boolean|Entities of a specific derived type can be created by specifying a type-cast segment -[*QueryOptions*](Org.OData.Capabilities.V1.xml#L624)|[ModificationQueryOptionsType?](#ModificationQueryOptionsType)|Support for query options with insert requests -[*CustomHeaders*](Org.OData.Capabilities.V1.xml#L627)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom headers -[*CustomQueryOptions*](Org.OData.Capabilities.V1.xml#L630)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom query options -[*Description*](Org.OData.Capabilities.V1.xml#L633)|String?|A brief description of the request -[*LongDescription*](Org.OData.Capabilities.V1.xml#L637)|String?|A long description of the request -[*ErrorResponses*](Org.OData.Capabilities.V1.xml#L641)|\[[HttpResponse](#HttpResponse)\]|Possible error responses returned by the request. -[NonInsertableProperties](Org.OData.Capabilities.V1.xml#L646)|\[PropertyPath\]|These structural properties cannot be specified on insert -[NonInsertableNavigationProperties](Org.OData.Capabilities.V1.xml#L649)|\[NavigationPropertyPath\]|These navigation properties do not allow deep inserts -[RequiredProperties](Org.OData.Capabilities.V1.xml#L652)|\[PropertyPath\]|These structural properties must be specified on insert -[Permissions](Org.OData.Capabilities.V1.xml#L655)|\[[PermissionType?](#PermissionType)\]|Required permissions. One of the specified sets of scopes is required to perform the insert. +[*Insertable*](Org.OData.Capabilities.V1.xml#L623)|Boolean|Entities can be inserted +[*MaxLevels*](Org.OData.Capabilities.V1.xml#L626)|Int32|The maximum number of navigation properties that can be traversed when addressing the collection to insert into. A value of -1 indicates there is no restriction. +[*TypecastSegmentSupported*](Org.OData.Capabilities.V1.xml#L629)|Boolean|Entities of a specific derived type can be created by specifying a type-cast segment +[*QueryOptions*](Org.OData.Capabilities.V1.xml#L632)|[ModificationQueryOptionsType?](#ModificationQueryOptionsType)|Support for query options with insert requests +[*CustomHeaders*](Org.OData.Capabilities.V1.xml#L635)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom headers +[*CustomQueryOptions*](Org.OData.Capabilities.V1.xml#L638)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom query options +[*Description*](Org.OData.Capabilities.V1.xml#L641)|String?|A brief description of the request +[*LongDescription*](Org.OData.Capabilities.V1.xml#L645)|String?|A long description of the request +[*ErrorResponses*](Org.OData.Capabilities.V1.xml#L649)|\[[HttpResponse](#HttpResponse)\]|Possible error responses returned by the request. +[NonInsertableProperties](Org.OData.Capabilities.V1.xml#L654)|\[PropertyPath\]|These structural properties cannot be specified on insert +[NonInsertableNavigationProperties](Org.OData.Capabilities.V1.xml#L657)|\[NavigationPropertyPath\]|These navigation properties do not allow deep inserts +[RequiredProperties](Org.OData.Capabilities.V1.xml#L660)|\[PropertyPath\]|These structural properties must be specified on insert +[Permissions](Org.OData.Capabilities.V1.xml#L663)|\[[PermissionType?](#PermissionType)\]|Required permissions. One of the specified sets of scopes is required to perform the insert. -## [PermissionType](Org.OData.Capabilities.V1.xml#L660) +## [PermissionType](Org.OData.Capabilities.V1.xml#L668) Property|Type|Description :-------|:---|:---------- -[SchemeName](Org.OData.Capabilities.V1.xml#L661)|[SchemeName](Org.OData.Authorization.V1.md#SchemeName)|Authorization flow scheme name -[Scopes](Org.OData.Capabilities.V1.xml#L664)|\[[ScopeType](#ScopeType)\]|List of scopes that can provide access to the resource +[SchemeName](Org.OData.Capabilities.V1.xml#L669)|[SchemeName](Org.OData.Authorization.V1.md#SchemeName)|Authorization flow scheme name +[Scopes](Org.OData.Capabilities.V1.xml#L672)|\[[ScopeType](#ScopeType)\]|List of scopes that can provide access to the resource -## [ScopeType](Org.OData.Capabilities.V1.xml#L669) +## [ScopeType](Org.OData.Capabilities.V1.xml#L677) Property|Type|Description :-------|:---|:---------- -[Scope](Org.OData.Capabilities.V1.xml#L670)|String|Name of the scope. -[RestrictedProperties](Org.OData.Capabilities.V1.xml#L673)|String?|Comma-separated string value of all properties that will be included or excluded when using the scope.
Possible string value identifiers when specifying properties are `*`, _PropertyName_, `-`_PropertyName_.
`*` denotes all properties are accessible.
`-`_PropertyName_ excludes that specific property.
_PropertyName_ explicitly provides access to the specific property.
The absence of `RestrictedProperties` denotes all properties are accessible using that scope. +[Scope](Org.OData.Capabilities.V1.xml#L678)|String|Name of the scope. +[RestrictedProperties](Org.OData.Capabilities.V1.xml#L681)|String?|Comma-separated string value of all properties that will be included or excluded when using the scope.
Possible string value identifiers when specifying properties are `*`, _PropertyName_, `-`_PropertyName_.
`*` denotes all properties are accessible.
`-`_PropertyName_ excludes that specific property.
_PropertyName_ explicitly provides access to the specific property.
The absence of `RestrictedProperties` denotes all properties are accessible using that scope. -## [DeepInsertSupportType](Org.OData.Capabilities.V1.xml#L693) +## [DeepInsertSupportType](Org.OData.Capabilities.V1.xml#L701) Property|Type|Description :-------|:---|:---------- -[Supported](Org.OData.Capabilities.V1.xml#L694)|Boolean|Annotation target supports deep inserts -[ContentIDSupported](Org.OData.Capabilities.V1.xml#L697)|Boolean|Annotation target supports accepting and returning nested entities annotated with the `Core.ContentID` instance annotation. +[Supported](Org.OData.Capabilities.V1.xml#L702)|Boolean|Annotation target supports deep inserts +[ContentIDSupported](Org.OData.Capabilities.V1.xml#L705)|Boolean|Annotation target supports accepting and returning nested entities annotated with the `Core.ContentID` instance annotation. -## [UpdateRestrictionsBase](Org.OData.Capabilities.V1.xml#L706) +## [UpdateRestrictionsBase](Org.OData.Capabilities.V1.xml#L714) **Derived Types:** @@ -472,70 +473,70 @@ Property|Type|Description Property|Type|Description :-------|:---|:---------- -[Updatable](Org.OData.Capabilities.V1.xml#L707)|Boolean|Entities can be updated -[Upsertable](Org.OData.Capabilities.V1.xml#L710)|Boolean|Entities can be upserted -[DeltaUpdateSupported](Org.OData.Capabilities.V1.xml#L713)|Boolean|Entities can be inserted, updated, and deleted via a PATCH request with a delta payload -[UpdateMethod](Org.OData.Capabilities.V1.xml#L716)|[HttpMethod?](#HttpMethod)|Supported HTTP Methods (PUT or PATCH) for updating an entity. If null, PATCH SHOULD be supported and PUT MAY be supported. -[FilterSegmentSupported](Org.OData.Capabilities.V1.xml#L719)|Boolean|Members of collections can be updated via a PATCH request with a `/$filter(...)/$each` segment -[TypecastSegmentSupported](Org.OData.Capabilities.V1.xml#L722)|Boolean|Members of collections can be updated via a PATCH request with a type-cast segment and a `/$each` segment -[MaxLevels](Org.OData.Capabilities.V1.xml#L725)|Int32|The maximum number of navigation properties that can be traversed when addressing the collection or entity to update. A value of -1 indicates there is no restriction. -[Permissions](Org.OData.Capabilities.V1.xml#L728)|\[[PermissionType?](#PermissionType)\]|Required permissions. One of the specified sets of scopes is required to perform the update. -[QueryOptions](Org.OData.Capabilities.V1.xml#L731)|[ModificationQueryOptionsType?](#ModificationQueryOptionsType)|Support for query options with update requests -[CustomHeaders](Org.OData.Capabilities.V1.xml#L734)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom headers -[CustomQueryOptions](Org.OData.Capabilities.V1.xml#L737)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom query options -[Description](Org.OData.Capabilities.V1.xml#L740)|String?|A brief description of the request -[LongDescription](Org.OData.Capabilities.V1.xml#L744)|String?|A long description of the request -[ErrorResponses](Org.OData.Capabilities.V1.xml#L748)|\[[HttpResponse](#HttpResponse)\]|Possible error responses returned by the request. +[Updatable](Org.OData.Capabilities.V1.xml#L715)|Boolean|Entities can be updated +[Upsertable](Org.OData.Capabilities.V1.xml#L718)|Boolean|Entities can be upserted +[DeltaUpdateSupported](Org.OData.Capabilities.V1.xml#L721)|Boolean|Entities can be inserted, updated, and deleted via a PATCH request with a delta payload +[UpdateMethod](Org.OData.Capabilities.V1.xml#L724)|[HttpMethod?](#HttpMethod)|Supported HTTP Methods (PUT or PATCH) for updating an entity. If null, PATCH SHOULD be supported and PUT MAY be supported. +[FilterSegmentSupported](Org.OData.Capabilities.V1.xml#L727)|Boolean|Members of collections can be updated via a PATCH request with a `/$filter(...)/$each` segment +[TypecastSegmentSupported](Org.OData.Capabilities.V1.xml#L730)|Boolean|Members of collections can be updated via a PATCH request with a type-cast segment and a `/$each` segment +[MaxLevels](Org.OData.Capabilities.V1.xml#L733)|Int32|The maximum number of navigation properties that can be traversed when addressing the collection or entity to update. A value of -1 indicates there is no restriction. +[Permissions](Org.OData.Capabilities.V1.xml#L736)|\[[PermissionType?](#PermissionType)\]|Required permissions. One of the specified sets of scopes is required to perform the update. +[QueryOptions](Org.OData.Capabilities.V1.xml#L739)|[ModificationQueryOptionsType?](#ModificationQueryOptionsType)|Support for query options with update requests +[CustomHeaders](Org.OData.Capabilities.V1.xml#L742)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom headers +[CustomQueryOptions](Org.OData.Capabilities.V1.xml#L745)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom query options +[Description](Org.OData.Capabilities.V1.xml#L748)|String?|A brief description of the request +[LongDescription](Org.OData.Capabilities.V1.xml#L752)|String?|A long description of the request +[ErrorResponses](Org.OData.Capabilities.V1.xml#L756)|\[[HttpResponse](#HttpResponse)\]|Possible error responses returned by the request. -## [UpdateRestrictionsType](Org.OData.Capabilities.V1.xml#L752): [UpdateRestrictionsBase](#UpdateRestrictionsBase) +## [UpdateRestrictionsType](Org.OData.Capabilities.V1.xml#L760): [UpdateRestrictionsBase](#UpdateRestrictionsBase) Property|Type|Description :-------|:---|:---------- -[*Updatable*](Org.OData.Capabilities.V1.xml#L707)|Boolean|Entities can be updated -[*Upsertable*](Org.OData.Capabilities.V1.xml#L710)|Boolean|Entities can be upserted -[*DeltaUpdateSupported*](Org.OData.Capabilities.V1.xml#L713)|Boolean|Entities can be inserted, updated, and deleted via a PATCH request with a delta payload -[*UpdateMethod*](Org.OData.Capabilities.V1.xml#L716)|[HttpMethod?](#HttpMethod)|Supported HTTP Methods (PUT or PATCH) for updating an entity. If null, PATCH SHOULD be supported and PUT MAY be supported. -[*FilterSegmentSupported*](Org.OData.Capabilities.V1.xml#L719)|Boolean|Members of collections can be updated via a PATCH request with a `/$filter(...)/$each` segment -[*TypecastSegmentSupported*](Org.OData.Capabilities.V1.xml#L722)|Boolean|Members of collections can be updated via a PATCH request with a type-cast segment and a `/$each` segment -[*MaxLevels*](Org.OData.Capabilities.V1.xml#L725)|Int32|The maximum number of navigation properties that can be traversed when addressing the collection or entity to update. A value of -1 indicates there is no restriction. -[*Permissions*](Org.OData.Capabilities.V1.xml#L728)|\[[PermissionType?](#PermissionType)\]|Required permissions. One of the specified sets of scopes is required to perform the update. -[*QueryOptions*](Org.OData.Capabilities.V1.xml#L731)|[ModificationQueryOptionsType?](#ModificationQueryOptionsType)|Support for query options with update requests -[*CustomHeaders*](Org.OData.Capabilities.V1.xml#L734)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom headers -[*CustomQueryOptions*](Org.OData.Capabilities.V1.xml#L737)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom query options -[*Description*](Org.OData.Capabilities.V1.xml#L740)|String?|A brief description of the request -[*LongDescription*](Org.OData.Capabilities.V1.xml#L744)|String?|A long description of the request -[*ErrorResponses*](Org.OData.Capabilities.V1.xml#L748)|\[[HttpResponse](#HttpResponse)\]|Possible error responses returned by the request. -[NonUpdatableProperties](Org.OData.Capabilities.V1.xml#L753)|\[PropertyPath\]|These structural properties cannot be specified on update -[NonUpdatableNavigationProperties](Org.OData.Capabilities.V1.xml#L756)|\[NavigationPropertyPath\]|These navigation properties do not allow rebinding -[RequiredProperties](Org.OData.Capabilities.V1.xml#L759)|\[PropertyPath\]|These structural properties must be specified on update +[*Updatable*](Org.OData.Capabilities.V1.xml#L715)|Boolean|Entities can be updated +[*Upsertable*](Org.OData.Capabilities.V1.xml#L718)|Boolean|Entities can be upserted +[*DeltaUpdateSupported*](Org.OData.Capabilities.V1.xml#L721)|Boolean|Entities can be inserted, updated, and deleted via a PATCH request with a delta payload +[*UpdateMethod*](Org.OData.Capabilities.V1.xml#L724)|[HttpMethod?](#HttpMethod)|Supported HTTP Methods (PUT or PATCH) for updating an entity. If null, PATCH SHOULD be supported and PUT MAY be supported. +[*FilterSegmentSupported*](Org.OData.Capabilities.V1.xml#L727)|Boolean|Members of collections can be updated via a PATCH request with a `/$filter(...)/$each` segment +[*TypecastSegmentSupported*](Org.OData.Capabilities.V1.xml#L730)|Boolean|Members of collections can be updated via a PATCH request with a type-cast segment and a `/$each` segment +[*MaxLevels*](Org.OData.Capabilities.V1.xml#L733)|Int32|The maximum number of navigation properties that can be traversed when addressing the collection or entity to update. A value of -1 indicates there is no restriction. +[*Permissions*](Org.OData.Capabilities.V1.xml#L736)|\[[PermissionType?](#PermissionType)\]|Required permissions. One of the specified sets of scopes is required to perform the update. +[*QueryOptions*](Org.OData.Capabilities.V1.xml#L739)|[ModificationQueryOptionsType?](#ModificationQueryOptionsType)|Support for query options with update requests +[*CustomHeaders*](Org.OData.Capabilities.V1.xml#L742)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom headers +[*CustomQueryOptions*](Org.OData.Capabilities.V1.xml#L745)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom query options +[*Description*](Org.OData.Capabilities.V1.xml#L748)|String?|A brief description of the request +[*LongDescription*](Org.OData.Capabilities.V1.xml#L752)|String?|A long description of the request +[*ErrorResponses*](Org.OData.Capabilities.V1.xml#L756)|\[[HttpResponse](#HttpResponse)\]|Possible error responses returned by the request. +[NonUpdatableProperties](Org.OData.Capabilities.V1.xml#L761)|\[PropertyPath\]|These structural properties cannot be specified on update +[NonUpdatableNavigationProperties](Org.OData.Capabilities.V1.xml#L764)|\[NavigationPropertyPath\]|These navigation properties do not allow rebinding +[RequiredProperties](Org.OData.Capabilities.V1.xml#L767)|\[PropertyPath\]|These structural properties must be specified on update -## [HttpMethod](Org.OData.Capabilities.V1.xml#L764) +## [HttpMethod](Org.OData.Capabilities.V1.xml#L772) Flag Member|Value|Description :-----|----:|:---------- -[GET](Org.OData.Capabilities.V1.xml#L765)|1|The HTTP GET Method -[PATCH](Org.OData.Capabilities.V1.xml#L768)|2|The HTTP PATCH Method -[PUT](Org.OData.Capabilities.V1.xml#L771)|4|The HTTP PUT Method -[POST](Org.OData.Capabilities.V1.xml#L774)|8|The HTTP POST Method -[DELETE](Org.OData.Capabilities.V1.xml#L777)|16|The HTTP DELETE Method -[OPTIONS](Org.OData.Capabilities.V1.xml#L780)|32|The HTTP OPTIONS Method -[HEAD](Org.OData.Capabilities.V1.xml#L783)|64|The HTTP HEAD Method +[GET](Org.OData.Capabilities.V1.xml#L773)|1|The HTTP GET Method +[PATCH](Org.OData.Capabilities.V1.xml#L776)|2|The HTTP PATCH Method +[PUT](Org.OData.Capabilities.V1.xml#L779)|4|The HTTP PUT Method +[POST](Org.OData.Capabilities.V1.xml#L782)|8|The HTTP POST Method +[DELETE](Org.OData.Capabilities.V1.xml#L785)|16|The HTTP DELETE Method +[OPTIONS](Org.OData.Capabilities.V1.xml#L788)|32|The HTTP OPTIONS Method +[HEAD](Org.OData.Capabilities.V1.xml#L791)|64|The HTTP HEAD Method -## [DeepUpdateSupportType](Org.OData.Capabilities.V1.xml#L792) +## [DeepUpdateSupportType](Org.OData.Capabilities.V1.xml#L800) Property|Type|Description :-------|:---|:---------- -[Supported](Org.OData.Capabilities.V1.xml#L793)|Boolean|Annotation target supports deep updates -[ContentIDSupported](Org.OData.Capabilities.V1.xml#L796)|Boolean|Annotation target supports accepting and returning nested entities annotated with the `Core.ContentID` instance annotation. +[Supported](Org.OData.Capabilities.V1.xml#L801)|Boolean|Annotation target supports deep updates +[ContentIDSupported](Org.OData.Capabilities.V1.xml#L804)|Boolean|Annotation target supports accepting and returning nested entities annotated with the `Core.ContentID` instance annotation. -## [DeleteRestrictionsBase](Org.OData.Capabilities.V1.xml#L805) +## [DeleteRestrictionsBase](Org.OData.Capabilities.V1.xml#L813) **Derived Types:** @@ -543,80 +544,80 @@ Property|Type|Description Property|Type|Description :-------|:---|:---------- -[Deletable](Org.OData.Capabilities.V1.xml#L806)|Boolean|Entities can be deleted -[MaxLevels](Org.OData.Capabilities.V1.xml#L809)|Int32|The maximum number of navigation properties that can be traversed when addressing the collection to delete from or the entity to delete. A value of -1 indicates there is no restriction. -[FilterSegmentSupported](Org.OData.Capabilities.V1.xml#L812)|Boolean|Members of collections can be deleted via a DELETE request with a `/$filter(...)/$each` segment -[TypecastSegmentSupported](Org.OData.Capabilities.V1.xml#L815)|Boolean|Members of collections can be deleted via a DELETE request with a type-cast segment and a `/$each` segment -[Permissions](Org.OData.Capabilities.V1.xml#L818)|\[[PermissionType?](#PermissionType)\]|Required permissions. One of the specified sets of scopes is required to perform the delete. -[CustomHeaders](Org.OData.Capabilities.V1.xml#L821)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom headers -[CustomQueryOptions](Org.OData.Capabilities.V1.xml#L824)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom query options -[Description](Org.OData.Capabilities.V1.xml#L827)|String?|A brief description of the request -[LongDescription](Org.OData.Capabilities.V1.xml#L831)|String?|A long description of the request -[ErrorResponses](Org.OData.Capabilities.V1.xml#L835)|\[[HttpResponse](#HttpResponse)\]|Possible error responses returned by the request. +[Deletable](Org.OData.Capabilities.V1.xml#L814)|Boolean|Entities can be deleted +[MaxLevels](Org.OData.Capabilities.V1.xml#L817)|Int32|The maximum number of navigation properties that can be traversed when addressing the collection to delete from or the entity to delete. A value of -1 indicates there is no restriction. +[FilterSegmentSupported](Org.OData.Capabilities.V1.xml#L820)|Boolean|Members of collections can be deleted via a DELETE request with a `/$filter(...)/$each` segment +[TypecastSegmentSupported](Org.OData.Capabilities.V1.xml#L823)|Boolean|Members of collections can be deleted via a DELETE request with a type-cast segment and a `/$each` segment +[Permissions](Org.OData.Capabilities.V1.xml#L826)|\[[PermissionType?](#PermissionType)\]|Required permissions. One of the specified sets of scopes is required to perform the delete. +[CustomHeaders](Org.OData.Capabilities.V1.xml#L829)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom headers +[CustomQueryOptions](Org.OData.Capabilities.V1.xml#L832)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom query options +[Description](Org.OData.Capabilities.V1.xml#L835)|String?|A brief description of the request +[LongDescription](Org.OData.Capabilities.V1.xml#L839)|String?|A long description of the request +[ErrorResponses](Org.OData.Capabilities.V1.xml#L843)|\[[HttpResponse](#HttpResponse)\]|Possible error responses returned by the request. -## [DeleteRestrictionsType](Org.OData.Capabilities.V1.xml#L839): [DeleteRestrictionsBase](#DeleteRestrictionsBase) +## [DeleteRestrictionsType](Org.OData.Capabilities.V1.xml#L847): [DeleteRestrictionsBase](#DeleteRestrictionsBase) Property|Type|Description :-------|:---|:---------- -[*Deletable*](Org.OData.Capabilities.V1.xml#L806)|Boolean|Entities can be deleted -[*MaxLevels*](Org.OData.Capabilities.V1.xml#L809)|Int32|The maximum number of navigation properties that can be traversed when addressing the collection to delete from or the entity to delete. A value of -1 indicates there is no restriction. -[*FilterSegmentSupported*](Org.OData.Capabilities.V1.xml#L812)|Boolean|Members of collections can be deleted via a DELETE request with a `/$filter(...)/$each` segment -[*TypecastSegmentSupported*](Org.OData.Capabilities.V1.xml#L815)|Boolean|Members of collections can be deleted via a DELETE request with a type-cast segment and a `/$each` segment -[*Permissions*](Org.OData.Capabilities.V1.xml#L818)|\[[PermissionType?](#PermissionType)\]|Required permissions. One of the specified sets of scopes is required to perform the delete. -[*CustomHeaders*](Org.OData.Capabilities.V1.xml#L821)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom headers -[*CustomQueryOptions*](Org.OData.Capabilities.V1.xml#L824)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom query options -[*Description*](Org.OData.Capabilities.V1.xml#L827)|String?|A brief description of the request -[*LongDescription*](Org.OData.Capabilities.V1.xml#L831)|String?|A long description of the request -[*ErrorResponses*](Org.OData.Capabilities.V1.xml#L835)|\[[HttpResponse](#HttpResponse)\]|Possible error responses returned by the request. -[NonDeletableNavigationProperties](Org.OData.Capabilities.V1.xml#L840)|\[NavigationPropertyPath\]|These navigation properties do not allow DeleteLink requests +[*Deletable*](Org.OData.Capabilities.V1.xml#L814)|Boolean|Entities can be deleted +[*MaxLevels*](Org.OData.Capabilities.V1.xml#L817)|Int32|The maximum number of navigation properties that can be traversed when addressing the collection to delete from or the entity to delete. A value of -1 indicates there is no restriction. +[*FilterSegmentSupported*](Org.OData.Capabilities.V1.xml#L820)|Boolean|Members of collections can be deleted via a DELETE request with a `/$filter(...)/$each` segment +[*TypecastSegmentSupported*](Org.OData.Capabilities.V1.xml#L823)|Boolean|Members of collections can be deleted via a DELETE request with a type-cast segment and a `/$each` segment +[*Permissions*](Org.OData.Capabilities.V1.xml#L826)|\[[PermissionType?](#PermissionType)\]|Required permissions. One of the specified sets of scopes is required to perform the delete. +[*CustomHeaders*](Org.OData.Capabilities.V1.xml#L829)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom headers +[*CustomQueryOptions*](Org.OData.Capabilities.V1.xml#L832)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom query options +[*Description*](Org.OData.Capabilities.V1.xml#L835)|String?|A brief description of the request +[*LongDescription*](Org.OData.Capabilities.V1.xml#L839)|String?|A long description of the request +[*ErrorResponses*](Org.OData.Capabilities.V1.xml#L843)|\[[HttpResponse](#HttpResponse)\]|Possible error responses returned by the request. +[NonDeletableNavigationProperties](Org.OData.Capabilities.V1.xml#L848)|\[NavigationPropertyPath\]|These navigation properties do not allow DeleteLink requests -## [CollectionPropertyRestrictionsType](Org.OData.Capabilities.V1.xml#L848) +## [CollectionPropertyRestrictionsType](Org.OData.Capabilities.V1.xml#L856) Property|Type|Description :-------|:---|:---------- -[CollectionProperty](Org.OData.Capabilities.V1.xml#L849)|PropertyPath?|Restricted Collection-valued property -[FilterFunctions](Org.OData.Capabilities.V1.xml#L852)|\[String\]|List of functions and operators supported in filter expressions
If not specified, null, or empty, all functions and operators may be attempted. -[FilterRestrictions](Org.OData.Capabilities.V1.xml#L856)|[FilterRestrictionsType?](#FilterRestrictionsType)|Restrictions on filter expressions -[SearchRestrictions](Org.OData.Capabilities.V1.xml#L859)|[SearchRestrictionsType?](#SearchRestrictionsType)|Restrictions on search expressions -[SortRestrictions](Org.OData.Capabilities.V1.xml#L862)|[SortRestrictionsType?](#SortRestrictionsType)|Restrictions on orderby expressions -[TopSupported](Org.OData.Capabilities.V1.xml#L865)|Boolean|Supports $top -[SkipSupported](Org.OData.Capabilities.V1.xml#L868)|Boolean|Supports $skip -[SelectSupport](Org.OData.Capabilities.V1.xml#L871)|[SelectSupportType?](#SelectSupportType)|Support for $select -[Insertable](Org.OData.Capabilities.V1.xml#L874)|Boolean|Members can be inserted into this collection
If additionally annotated with [Core.PositionalInsert](Org.OData.Core.V1.md#PositionalInsert), members can be inserted at a specific position -[Updatable](Org.OData.Capabilities.V1.xml#L878)|Boolean|Members of this ordered collection can be updated by ordinal -[Deletable](Org.OData.Capabilities.V1.xml#L881)|Boolean|Members of this ordered collection can be deleted by ordinal +[CollectionProperty](Org.OData.Capabilities.V1.xml#L857)|PropertyPath?|Restricted Collection-valued property +[FilterFunctions](Org.OData.Capabilities.V1.xml#L860)|\[String\]|List of functions and operators supported in filter expressions
If not specified, null, or empty, all functions and operators may be attempted. +[FilterRestrictions](Org.OData.Capabilities.V1.xml#L864)|[FilterRestrictionsType?](#FilterRestrictionsType)|Restrictions on filter expressions +[SearchRestrictions](Org.OData.Capabilities.V1.xml#L867)|[SearchRestrictionsType?](#SearchRestrictionsType)|Restrictions on search expressions +[SortRestrictions](Org.OData.Capabilities.V1.xml#L870)|[SortRestrictionsType?](#SortRestrictionsType)|Restrictions on orderby expressions +[TopSupported](Org.OData.Capabilities.V1.xml#L873)|Boolean|Supports $top +[SkipSupported](Org.OData.Capabilities.V1.xml#L876)|Boolean|Supports $skip +[SelectSupport](Org.OData.Capabilities.V1.xml#L879)|[SelectSupportType?](#SelectSupportType)|Support for $select +[Insertable](Org.OData.Capabilities.V1.xml#L882)|Boolean|Members can be inserted into this collection
If additionally annotated with [Core.PositionalInsert](Org.OData.Core.V1.md#PositionalInsert), members can be inserted at a specific position +[Updatable](Org.OData.Capabilities.V1.xml#L886)|Boolean|Members of this ordered collection can be updated by ordinal +[Deletable](Org.OData.Capabilities.V1.xml#L889)|Boolean|Members of this ordered collection can be deleted by ordinal -## [OperationRestrictionsType](Org.OData.Capabilities.V1.xml#L889) +## [OperationRestrictionsType](Org.OData.Capabilities.V1.xml#L897) Property|Type|Description :-------|:---|:---------- -[FilterSegmentSupported](Org.OData.Capabilities.V1.xml#L890)|Boolean|Bound action or function can be invoked on a collection-valued binding parameter path with a `/$filter(...)` segment -[Permissions](Org.OData.Capabilities.V1.xml#L893)|\[[PermissionType?](#PermissionType)\]|Required permissions. One of the specified sets of scopes is required to invoke an action or function -[CustomHeaders](Org.OData.Capabilities.V1.xml#L896)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom headers -[CustomQueryOptions](Org.OData.Capabilities.V1.xml#L899)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom query options -[ErrorResponses](Org.OData.Capabilities.V1.xml#L902)|\[[HttpResponse](#HttpResponse)\]|Possible error responses returned by the request. +[FilterSegmentSupported](Org.OData.Capabilities.V1.xml#L898)|Boolean|Bound action or function can be invoked on a collection-valued binding parameter path with a `/$filter(...)` segment +[Permissions](Org.OData.Capabilities.V1.xml#L901)|\[[PermissionType?](#PermissionType)\]|Required permissions. One of the specified sets of scopes is required to invoke an action or function +[CustomHeaders](Org.OData.Capabilities.V1.xml#L904)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom headers +[CustomQueryOptions](Org.OData.Capabilities.V1.xml#L907)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom query options +[ErrorResponses](Org.OData.Capabilities.V1.xml#L910)|\[[HttpResponse](#HttpResponse)\]|Possible error responses returned by the request. -## [ModificationQueryOptionsType](Org.OData.Capabilities.V1.xml#L913) +## [ModificationQueryOptionsType](Org.OData.Capabilities.V1.xml#L921) Property|Type|Description :-------|:---|:---------- -[ExpandSupported](Org.OData.Capabilities.V1.xml#L914)|Boolean|Supports $expand with modification requests -[SelectSupported](Org.OData.Capabilities.V1.xml#L917)|Boolean|Supports $select with modification requests -[ComputeSupported](Org.OData.Capabilities.V1.xml#L920)|Boolean|Supports $compute with modification requests -[FilterSupported](Org.OData.Capabilities.V1.xml#L923)|Boolean|Supports $filter with modification requests -[SearchSupported](Org.OData.Capabilities.V1.xml#L926)|Boolean|Supports $search with modification requests -[SortSupported](Org.OData.Capabilities.V1.xml#L929)|Boolean|Supports $orderby with modification requests +[ExpandSupported](Org.OData.Capabilities.V1.xml#L922)|Boolean|Supports $expand with modification requests +[SelectSupported](Org.OData.Capabilities.V1.xml#L925)|Boolean|Supports $select with modification requests +[ComputeSupported](Org.OData.Capabilities.V1.xml#L928)|Boolean|Supports $compute with modification requests +[FilterSupported](Org.OData.Capabilities.V1.xml#L931)|Boolean|Supports $filter with modification requests +[SearchSupported](Org.OData.Capabilities.V1.xml#L934)|Boolean|Supports $search with modification requests +[SortSupported](Org.OData.Capabilities.V1.xml#L937)|Boolean|Supports $orderby with modification requests -## [*ReadRestrictionsBase*](Org.OData.Capabilities.V1.xml#L938) +## [*ReadRestrictionsBase*](Org.OData.Capabilities.V1.xml#L946) **Derived Types:** @@ -625,86 +626,86 @@ Property|Type|Description Property|Type|Description :-------|:---|:---------- -[Readable](Org.OData.Capabilities.V1.xml#L939)|Boolean|Entities can be retrieved -[Permissions](Org.OData.Capabilities.V1.xml#L942)|\[[PermissionType?](#PermissionType)\]|Required permissions. One of the specified sets of scopes is required to read. -[CustomHeaders](Org.OData.Capabilities.V1.xml#L945)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom headers -[CustomQueryOptions](Org.OData.Capabilities.V1.xml#L948)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom query options -[Description](Org.OData.Capabilities.V1.xml#L951)|String?|A brief description of the request -[LongDescription](Org.OData.Capabilities.V1.xml#L955)|String?|A long description of the request -[ErrorResponses](Org.OData.Capabilities.V1.xml#L959)|\[[HttpResponse](#HttpResponse)\]|Possible error responses returned by the request. +[Readable](Org.OData.Capabilities.V1.xml#L947)|Boolean|Entities can be retrieved +[Permissions](Org.OData.Capabilities.V1.xml#L950)|\[[PermissionType?](#PermissionType)\]|Required permissions. One of the specified sets of scopes is required to read. +[CustomHeaders](Org.OData.Capabilities.V1.xml#L953)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom headers +[CustomQueryOptions](Org.OData.Capabilities.V1.xml#L956)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom query options +[Description](Org.OData.Capabilities.V1.xml#L959)|String?|A brief description of the request +[LongDescription](Org.OData.Capabilities.V1.xml#L963)|String?|A long description of the request +[ErrorResponses](Org.OData.Capabilities.V1.xml#L967)|\[[HttpResponse](#HttpResponse)\]|Possible error responses returned by the request. -## [ReadByKeyRestrictionsType](Org.OData.Capabilities.V1.xml#L963): [ReadRestrictionsBase](#ReadRestrictionsBase) +## [ReadByKeyRestrictionsType](Org.OData.Capabilities.V1.xml#L971): [ReadRestrictionsBase](#ReadRestrictionsBase) Restrictions for retrieving an entity by key Property|Type|Description :-------|:---|:---------- -[*Readable*](Org.OData.Capabilities.V1.xml#L939)|Boolean|Entities can be retrieved -[*Permissions*](Org.OData.Capabilities.V1.xml#L942)|\[[PermissionType?](#PermissionType)\]|Required permissions. One of the specified sets of scopes is required to read. -[*CustomHeaders*](Org.OData.Capabilities.V1.xml#L945)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom headers -[*CustomQueryOptions*](Org.OData.Capabilities.V1.xml#L948)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom query options -[*Description*](Org.OData.Capabilities.V1.xml#L951)|String?|A brief description of the request -[*LongDescription*](Org.OData.Capabilities.V1.xml#L955)|String?|A long description of the request -[*ErrorResponses*](Org.OData.Capabilities.V1.xml#L959)|\[[HttpResponse](#HttpResponse)\]|Possible error responses returned by the request. +[*Readable*](Org.OData.Capabilities.V1.xml#L947)|Boolean|Entities can be retrieved +[*Permissions*](Org.OData.Capabilities.V1.xml#L950)|\[[PermissionType?](#PermissionType)\]|Required permissions. One of the specified sets of scopes is required to read. +[*CustomHeaders*](Org.OData.Capabilities.V1.xml#L953)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom headers +[*CustomQueryOptions*](Org.OData.Capabilities.V1.xml#L956)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom query options +[*Description*](Org.OData.Capabilities.V1.xml#L959)|String?|A brief description of the request +[*LongDescription*](Org.OData.Capabilities.V1.xml#L963)|String?|A long description of the request +[*ErrorResponses*](Org.OData.Capabilities.V1.xml#L967)|\[[HttpResponse](#HttpResponse)\]|Possible error responses returned by the request. -## [ReadRestrictionsType](Org.OData.Capabilities.V1.xml#L966): [ReadRestrictionsBase](#ReadRestrictionsBase) +## [ReadRestrictionsType](Org.OData.Capabilities.V1.xml#L974): [ReadRestrictionsBase](#ReadRestrictionsBase) Property|Type|Description :-------|:---|:---------- -[*Readable*](Org.OData.Capabilities.V1.xml#L939)|Boolean|Entities can be retrieved -[*Permissions*](Org.OData.Capabilities.V1.xml#L942)|\[[PermissionType?](#PermissionType)\]|Required permissions. One of the specified sets of scopes is required to read. -[*CustomHeaders*](Org.OData.Capabilities.V1.xml#L945)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom headers -[*CustomQueryOptions*](Org.OData.Capabilities.V1.xml#L948)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom query options -[*Description*](Org.OData.Capabilities.V1.xml#L951)|String?|A brief description of the request -[*LongDescription*](Org.OData.Capabilities.V1.xml#L955)|String?|A long description of the request -[*ErrorResponses*](Org.OData.Capabilities.V1.xml#L959)|\[[HttpResponse](#HttpResponse)\]|Possible error responses returned by the request. -[TypecastSegmentSupported](Org.OData.Capabilities.V1.xml#L967)|Boolean|Entities of a specific derived type can be read by specifying a type-cast segment -[ReadByKeyRestrictions](Org.OData.Capabilities.V1.xml#L970)|[ReadByKeyRestrictionsType?](#ReadByKeyRestrictionsType)|Restrictions for retrieving an entity by key
Only valid when applied to a collection. If a property of `ReadByKeyRestrictions` is not specified, the corresponding property value of `ReadRestrictions` applies. +[*Readable*](Org.OData.Capabilities.V1.xml#L947)|Boolean|Entities can be retrieved +[*Permissions*](Org.OData.Capabilities.V1.xml#L950)|\[[PermissionType?](#PermissionType)\]|Required permissions. One of the specified sets of scopes is required to read. +[*CustomHeaders*](Org.OData.Capabilities.V1.xml#L953)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom headers +[*CustomQueryOptions*](Org.OData.Capabilities.V1.xml#L956)|\[[CustomParameter](#CustomParameter)\]|Supported or required custom query options +[*Description*](Org.OData.Capabilities.V1.xml#L959)|String?|A brief description of the request +[*LongDescription*](Org.OData.Capabilities.V1.xml#L963)|String?|A long description of the request +[*ErrorResponses*](Org.OData.Capabilities.V1.xml#L967)|\[[HttpResponse](#HttpResponse)\]|Possible error responses returned by the request. +[TypecastSegmentSupported](Org.OData.Capabilities.V1.xml#L975)|Boolean|Entities of a specific derived type can be read by specifying a type-cast segment +[ReadByKeyRestrictions](Org.OData.Capabilities.V1.xml#L978)|[ReadByKeyRestrictionsType?](#ReadByKeyRestrictionsType)|Restrictions for retrieving an entity by key
Only valid when applied to a collection. If a property of `ReadByKeyRestrictions` is not specified, the corresponding property value of `ReadRestrictions` applies. -## [CustomParameter](Org.OData.Capabilities.V1.xml#L1033) +## [CustomParameter](Org.OData.Capabilities.V1.xml#L1041) A custom parameter is either a header or a query option The type of a custom parameter is always a string. Restrictions on the parameter values can be expressed by annotating the record expression describing the parameter with terms from the Validation vocabulary, e.g. Validation.Pattern or Validation.AllowedValues. Property|Type|Description :-------|:---|:---------- -[Name](Org.OData.Capabilities.V1.xml#L1036)|String|Name of the custom parameter -[Description](Org.OData.Capabilities.V1.xml#L1039)|String?|Description of the custom parameter -[DocumentationURL](Org.OData.Capabilities.V1.xml#L1042)|URL?|URL of related documentation -[Required](Org.OData.Capabilities.V1.xml#L1046)|Boolean|true: parameter is required, false or not specified: parameter is optional -[ExampleValues](Org.OData.Capabilities.V1.xml#L1049)|\[[PrimitiveExampleValue](Org.OData.Core.V1.md#PrimitiveExampleValue)\]|Example values for the custom parameter +[Name](Org.OData.Capabilities.V1.xml#L1044)|String|Name of the custom parameter +[Description](Org.OData.Capabilities.V1.xml#L1047)|String?|Description of the custom parameter +[DocumentationURL](Org.OData.Capabilities.V1.xml#L1050)|URL?|URL of related documentation +[Required](Org.OData.Capabilities.V1.xml#L1054)|Boolean|true: parameter is required, false or not specified: parameter is optional +[ExampleValues](Org.OData.Capabilities.V1.xml#L1057)|\[[PrimitiveExampleValue](Org.OData.Core.V1.md#PrimitiveExampleValue)\]|Example values for the custom parameter -## [DefaultCapabilitiesType](Org.OData.Capabilities.V1.xml#L1068) +## [DefaultCapabilitiesType](Org.OData.Capabilities.V1.xml#L1076) Property|Type|Description :-------|:---|:---------- -[ChangeTracking](Org.OData.Capabilities.V1.xml#L1069)|[ChangeTrackingBase?](#ChangeTrackingBase)|Change tracking capabilities -[CountRestrictions](Org.OData.Capabilities.V1.xml#L1072)|[CountRestrictionsBase?](#CountRestrictionsBase)|Restrictions on /$count path suffix and $count=true system query option -[IndexableByKey](Org.OData.Capabilities.V1.xml#L1075)|[Tag?](Org.OData.Core.V1.md#Tag)|Supports key values according to OData URL conventions -[TopSupported](Org.OData.Capabilities.V1.xml#L1078)|[Tag?](Org.OData.Core.V1.md#Tag)|Supports $top -[SkipSupported](Org.OData.Capabilities.V1.xml#L1081)|[Tag?](Org.OData.Core.V1.md#Tag)|Supports $skip -[ComputeSupported](Org.OData.Capabilities.V1.xml#L1084)|[Tag?](Org.OData.Core.V1.md#Tag)|Supports $compute -[SelectSupport](Org.OData.Capabilities.V1.xml#L1087)|[SelectSupportType?](#SelectSupportType)|Support for $select and nested query options within $select -[FilterRestrictions](Org.OData.Capabilities.V1.xml#L1090)|[FilterRestrictionsBase?](#FilterRestrictionsBase)|Restrictions on filter expressions -[SortRestrictions](Org.OData.Capabilities.V1.xml#L1093)|[SortRestrictionsBase?](#SortRestrictionsBase)|Restrictions on orderby expressions -[ExpandRestrictions](Org.OData.Capabilities.V1.xml#L1096)|[ExpandRestrictionsBase?](#ExpandRestrictionsBase)|Restrictions on expand expressions -[SearchRestrictions](Org.OData.Capabilities.V1.xml#L1099)|[SearchRestrictionsType?](#SearchRestrictionsType)|Restrictions on search expressions -[InsertRestrictions](Org.OData.Capabilities.V1.xml#L1102)|[InsertRestrictionsBase?](#InsertRestrictionsBase)|Restrictions on insert operations -[UpdateRestrictions](Org.OData.Capabilities.V1.xml#L1105)|[UpdateRestrictionsBase?](#UpdateRestrictionsBase)|Restrictions on update operations -[DeleteRestrictions](Org.OData.Capabilities.V1.xml#L1108)|[DeleteRestrictionsBase?](#DeleteRestrictionsBase)|Restrictions on delete operations -[OperationRestrictions](Org.OData.Capabilities.V1.xml#L1111)|[OperationRestrictionsType?](#OperationRestrictionsType)|Restrictions for function or action operations -[ReadRestrictions](Org.OData.Capabilities.V1.xml#L1114)|[ReadRestrictionsType?](#ReadRestrictionsType)|Restrictions for retrieving a collection of entities, retrieving a singleton instance +[ChangeTracking](Org.OData.Capabilities.V1.xml#L1077)|[ChangeTrackingBase?](#ChangeTrackingBase)|Change tracking capabilities +[CountRestrictions](Org.OData.Capabilities.V1.xml#L1080)|[CountRestrictionsBase?](#CountRestrictionsBase)|Restrictions on /$count path suffix and $count=true system query option +[IndexableByKey](Org.OData.Capabilities.V1.xml#L1083)|[Tag?](Org.OData.Core.V1.md#Tag)|Supports key values according to OData URL conventions +[TopSupported](Org.OData.Capabilities.V1.xml#L1086)|[Tag?](Org.OData.Core.V1.md#Tag)|Supports $top +[SkipSupported](Org.OData.Capabilities.V1.xml#L1089)|[Tag?](Org.OData.Core.V1.md#Tag)|Supports $skip +[ComputeSupported](Org.OData.Capabilities.V1.xml#L1092)|[Tag?](Org.OData.Core.V1.md#Tag)|Supports $compute +[SelectSupport](Org.OData.Capabilities.V1.xml#L1095)|[SelectSupportType?](#SelectSupportType)|Support for $select and nested query options within $select +[FilterRestrictions](Org.OData.Capabilities.V1.xml#L1098)|[FilterRestrictionsBase?](#FilterRestrictionsBase)|Restrictions on filter expressions +[SortRestrictions](Org.OData.Capabilities.V1.xml#L1101)|[SortRestrictionsBase?](#SortRestrictionsBase)|Restrictions on orderby expressions +[ExpandRestrictions](Org.OData.Capabilities.V1.xml#L1104)|[ExpandRestrictionsBase?](#ExpandRestrictionsBase)|Restrictions on expand expressions +[SearchRestrictions](Org.OData.Capabilities.V1.xml#L1107)|[SearchRestrictionsType?](#SearchRestrictionsType)|Restrictions on search expressions +[InsertRestrictions](Org.OData.Capabilities.V1.xml#L1110)|[InsertRestrictionsBase?](#InsertRestrictionsBase)|Restrictions on insert operations +[UpdateRestrictions](Org.OData.Capabilities.V1.xml#L1113)|[UpdateRestrictionsBase?](#UpdateRestrictionsBase)|Restrictions on update operations +[DeleteRestrictions](Org.OData.Capabilities.V1.xml#L1116)|[DeleteRestrictionsBase?](#DeleteRestrictionsBase)|Restrictions on delete operations +[OperationRestrictions](Org.OData.Capabilities.V1.xml#L1119)|[OperationRestrictionsType?](#OperationRestrictionsType)|Restrictions for function or action operations +[ReadRestrictions](Org.OData.Capabilities.V1.xml#L1122)|[ReadRestrictionsType?](#ReadRestrictionsType)|Restrictions for retrieving a collection of entities, retrieving a singleton instance -## [HttpResponse](Org.OData.Capabilities.V1.xml#L1119) +## [HttpResponse](Org.OData.Capabilities.V1.xml#L1127) Property|Type|Description :-------|:---|:---------- -[StatusCode](Org.OData.Capabilities.V1.xml#L1120)|String|HTTP response status code, for example 400, 403, 501 -[Description](Org.OData.Capabilities.V1.xml#L1123)|String|Human-readable description of the response +[StatusCode](Org.OData.Capabilities.V1.xml#L1128)|String|HTTP response status code, for example 400, 403, 501 +[Description](Org.OData.Capabilities.V1.xml#L1131)|String|Human-readable description of the response diff --git a/vocabularies/Org.OData.Capabilities.V1.xml b/vocabularies/Org.OData.Capabilities.V1.xml index b9e93ea2..edb29d17 100644 --- a/vocabularies/Org.OData.Capabilities.V1.xml +++ b/vocabularies/Org.OData.Capabilities.V1.xml @@ -573,12 +573,20 @@ supported: - + + + An unsupported expression may be treated as a term to be matched even if the + standard syntax treats it as a keyword. + + + + + - + diff --git a/vocabularies/Org.OData.Core.V1.json b/vocabularies/Org.OData.Core.V1.json index 9c2078b0..28c5d050 100644 --- a/vocabularies/Org.OData.Core.V1.json +++ b/vocabularies/Org.OData.Core.V1.json @@ -738,6 +738,15 @@ ], "@Core.Description": "Instances of a type are annotated with this tag if they have no common structure in a given response payload", "@Core.LongDescription": "The select-list of a context URL MUST be `(@Core.AnyStructure)` if it would otherwise be empty,\n but this instance annotation SHOULD be omitted from the response value." + }, + "Constructor": { + "$Kind": "Term", + "$Type": "Core.Tag", + "$DefaultValue": true, + "$AppliesTo": [ + "Action" + ], + "@Core.Description": "On success the annotated action creates a new entity" } } } \ No newline at end of file diff --git a/vocabularies/Org.OData.Core.V1.md b/vocabularies/Org.OData.Core.V1.md index 1f83dab4..4cc71e68 100644 --- a/vocabularies/Org.OData.Core.V1.md +++ b/vocabularies/Org.OData.Core.V1.md @@ -51,6 +51,7 @@ Term|Type|Description [SymbolicName](Org.OData.Core.V1.xml#L536)|[SimpleIdentifier](#SimpleIdentifier)|A symbolic name for a model element [GeometryFeature](Org.OData.Core.V1.xml#L545)|[GeometryFeatureType?](#GeometryFeatureType)|A [Feature Object](https://datatracker.ietf.org/doc/html/rfc7946#section-3.2) represents a spatially bounded thing [AnyStructure](Org.OData.Core.V1.xml#L561)|[Tag](#Tag)|Instances of a type are annotated with this tag if they have no common structure in a given response payload
The select-list of a context URL MUST be `(@Core.AnyStructure)` if it would otherwise be empty, but this instance annotation SHOULD be omitted from the response value. +[Constructor](Org.OData.Core.V1.xml#L569)|[Tag](#Tag)|On success the annotated action creates a new entity ## [RevisionType](Org.OData.Core.V1.xml#L80) diff --git a/vocabularies/Org.OData.Core.V1.xml b/vocabularies/Org.OData.Core.V1.xml index 086bde89..ad74b4d9 100644 --- a/vocabularies/Org.OData.Core.V1.xml +++ b/vocabularies/Org.OData.Core.V1.xml @@ -566,6 +566,10 @@ Any simple identifier | Any type listed in `Validation.OpenPropertyTypeConstrain
+ + + + diff --git a/vocabularies/Org.OData.JSON.V1.json b/vocabularies/Org.OData.JSON.V1.json index 2b6cefb6..953b52c6 100644 --- a/vocabularies/Org.OData.JSON.V1.json +++ b/vocabularies/Org.OData.JSON.V1.json @@ -12,7 +12,8 @@ }, "Org.OData.JSON.V1": { "$Alias": "JSON", - "@Core.Description": "Terms for JSON properties", + "@Core.Description": "Terms, types, and functions for JSON data", + "@Core.LongDescription": "OData [stream properties](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_ManagingStreamProperties) allow embedding data of arbitrary media types,\nand the OData JSON format allows [direct embedding of JSON data](https://docs.oasis-open.org/odata/odata-json-format/v4.01/odata-json-format-v4.01.html#sec_StreamProperty) in request and response payloads.\n\nThis vocabulary defines a convenience [type for JSON data](#JSON) as well as a term for referencing a [JSON Schema](#Schema) describing the structure of the JSON data.\n\nIn addition it defines two functions for [querying](#query) JSON data and using a [primitive value](#value) extracted from JSON data in common expressions, for example in `$filter`, `$orderby`, or `$compute`.\n\n**Example**\n\nThe `Employees` entity set has a JSON data property `resume` (see [CSDL JSON](../examples/Org.OData.JSON.V1.Schema-sample.json) or [CSDL XML](../examples/Org.OData.JSON.V1.Schema-sample.xml)).\n\nOne of its entities has a `resume` value of\n```json\n{ \n \"ssn\": \"1234\", \n \"lastname\": \"Doe\", \n \"address\": {\n \"zipcode\": \"10022\", \n \"street\": \"ABC st\"\n },\n \"experience\": \"excellent\"\n}\n```\n\nThis allows to filter and sort by values in that resume, and extract parts of the resume as a dynamic JSON data property\n```http\nGET http://www.example.com/mycompany/Employees\n ?$filter=resume/JSON.value(path='$.lastname') eq 'Doe'\n &$orderby=resume/JSON.valueNumber(path='$.experience')\n &$compute=resume/JSON.query(path='$.address') as address\n &$expand=address\n```\nreceiving\n```json\n{ \n \"@odata.context\": \"$metadata#Employees\", \n \"value\": [ \n {\n \"empid\": 4711,\n \"address\": {\n \"zipcode\": \"10022\", \n \"street\": \"ABC st\"\n }\n },\n ...\n ]\n}\n```\n ", "@Core.Links": [ { "rel": "alternate", @@ -40,8 +41,117 @@ ], "@Core.RequiresType": "Edm.Stream", "@Core.Description": "The JSON Schema for JSON values of the annotated media entity type, property, parameter, return type, term, or type definition", - "@Core.LongDescription": "The schema can be a schema reference, i.e. `{\"$ref\":\"url/of/schemafile#/path/to/schema/within/schemafile\"}`" + "@Core.LongDescription": "The schema can be a reference, i.e. `{\"$ref\":\"url/of/schemafile#/path/to/schema/within/schemafile\"}`" }, + "query": [ + { + "$Kind": "Function", + "$IsBound": true, + "$IsComposable": true, + "@Core.Description": "Query a stream value of media type `application/json`, returning a stream value of media type `application/json`", + "@Core.LongDescription": "Extracts a JSON value, such as an array, object, or a JSON scalar value (string, number, boolean, or `null`) from the `input` JSON value:\n- If `path` only consists of the root identifier followed by name and index selectors, it returns the identified single node within `input`, or `null` if no node is identified. \n- If `path` potentially identifies multiple nodes within `input` (by using descendant, wildcard, union, array subset, or filter selectors), it returns an array containing the identified nodes, or an empty array if no node is identified. \n- If `input` is not a valid JSON value, the function returns `null`.\n- If `path` is `null`, not a valid [JSONPath expression](#Path), or does not match the structure of `input` (for example applying an index selector to a scalar value), the function returns `null`. \n ", + "$Parameter": [ + { + "$Name": "input", + "$Type": "JSON.JSON", + "$Nullable": true, + "@Core.Description": "JSON input" + }, + { + "$Name": "path", + "$Type": "JSON.Path", + "$Nullable": true, + "@Core.Description": "JSONPath expression to be applied to value of `expr`" + } + ], + "$ReturnType": { + "$Type": "JSON.JSON", + "$Nullable": true, + "@Core.Description": "JSON value resulting from applying `path` to `input`" + } + } + ], + "value": [ + { + "$Kind": "Function", + "$IsBound": true, + "@Core.Description": "Query a stream value of media type `application/json`, returning a string", + "@Core.LongDescription": "Extracts a single OData primitive value from the `input` JSON value and casts it to a string:\n- If `path` only consists of the root identifier followed by name and index selectors and identifies a single scalar JSON value (string, number, boolean, or `null`) within `input`, it returns the identified single value, cast to a string.\n- If `path` identifies multiple nodes within `input` (by using descendant, wildcard, union, array subset, or filter selectors), identifies an object or array, or does not identify any node, the function returns `null`.\n- If `input` is not a valid JSON value, the function returns `null`.\n- If `path` is `null`, not a valid [JSONPath expression](#Path), or does not match the structure of `input` (for example applying an index selector to a scalar value), the function returns `null`.", + "$Parameter": [ + { + "$Name": "input", + "$Type": "JSON.JSON", + "$Nullable": true, + "@Core.Description": "JSON input" + }, + { + "$Name": "path", + "$Type": "JSON.Path", + "$Nullable": true, + "@Core.Description": "JSONPath expression to be applied to value of `expr`" + } + ], + "$ReturnType": { + "$Nullable": true, + "@Core.Description": "String value resulting from applying `path` to `input`" + } + } + ], + "valueNumber": [ + { + "$Kind": "Function", + "$IsBound": true, + "@Core.Description": "Query a stream value of media type `application/json`, returning a number", + "@Core.LongDescription": "Like [`value`](#value), but casts the extracted value to an `Edm.Decimal` with unspecified precision and floating scale.\n Returns null if that cast fails.", + "$Parameter": [ + { + "$Name": "input", + "$Type": "JSON.JSON", + "$Nullable": true, + "@Core.Description": "JSON input" + }, + { + "$Name": "path", + "$Type": "JSON.Path", + "$Nullable": true, + "@Core.Description": "JSONPath expression to be applied to value of `expr`" + } + ], + "$ReturnType": { + "$Type": "Edm.Decimal", + "$Nullable": true, + "$Scale": "floating", + "@Core.Description": "Numeric value resulting from applying `path` to `input`" + } + } + ], + "valueBoolean": [ + { + "$Kind": "Function", + "$IsBound": true, + "@Core.Description": "Query a stream value of media type `application/json`, returning a Boolean", + "@Core.LongDescription": "Like [`value`](#value), but casts the extracted value to an `Edm.Boolean`.\n Returns null if that cast fails.", + "$Parameter": [ + { + "$Name": "input", + "$Type": "JSON.JSON", + "$Nullable": true, + "@Core.Description": "JSON input" + }, + { + "$Name": "path", + "$Type": "JSON.Path", + "$Nullable": true, + "@Core.Description": "JSONPath expression to be applied to value of `expr`" + } + ], + "$ReturnType": { + "$Type": "Edm.Boolean", + "$Nullable": true, + "@Core.Description": "Boolean value resulting from applying `path` to `input`" + } + } + ], "JSON": { "$Kind": "TypeDefinition", "$UnderlyingType": "Edm.Stream", @@ -50,6 +160,12 @@ "@Core.AcceptableMediaTypes": [ "application/json" ] + }, + "Path": { + "$Kind": "TypeDefinition", + "$UnderlyingType": "Edm.String", + "@Core.Description": "[JSONPath](https://datatracker.ietf.org/doc/html/rfc9535) expression", + "@Core.LongDescription": "Implementations MUST support at least the following subset of JSONPath:\n\nSyntax Element | Description | Examples\n---------------|-------------|--------\n`$` | [root identifier](https://datatracker.ietf.org/doc/html/rfc9535#root-identifier) | `$`\n`[]` | [child segment](https://datatracker.ietf.org/doc/html/rfc9535#child-segment) selects one child of a node; contains one [name selector](https://datatracker.ietf.org/doc/html/rfc9535#name-selector) (single- or double-quoted string using JSON escaping rules) or [index selector](https://datatracker.ietf.org/doc/html/rfc9535#index-selector) (non-negative decimal integer) | `$['foo']`, `$.foo[\"bar\"]`, `$.bar[0]`, `$.bar[42]`\n`.name` | shorthand for `['name']` | `$.foo`, `$.foo.bar`, `$.bar[42].baz`\n\nImplementations MAY in addition support other JSONPath constructs, for example:\n\nSyntax Element | Description | Examples\n---------------|-------------|--------\n`[]` | index selector with negative integer array index (counts from the end of the array) | `$.bar[-1]`\n`[]` | non-empty, comma-separated sequence of selectors | `$.foo['bar','baz']`, `$.bar[0,1,2,3,5,7,11]`\n`..[]` | [descendant segment](https://datatracker.ietf.org/doc/html/rfc9535#descendant-segment): selects zero or more descendants of a node | `$.foo..[\"bar\"]`\n`..name` | shorthand for `..['name']` | `$.foo..bar`\n`*` | [wildcard selector](https://datatracker.ietf.org/doc/html/rfc9535#name-selector): selects all children of a node | `$.foo[*]`, `$[*]`\n`.*` | shorthand for `[*]` | `$.foo.*`, `$.*`\n`..*` | shorthand for `..[*]` | `$.foo..*`, `$..*`\n`[start:end]` | array subset by range of indices (including the item at _start_ and excluding the item at _end_ | `$.bar[2:5]`, same as `$.bar[2,3,4]`\n`[start:]` | array subset from _start_ to end of array | `$.bar[2:]`\n`[:n]` | the first _n_ array items | `$.bar[:4]`\n`[-n:]` | the last _n_ array items | `$.bar[-3:]`\n`[start:end:step]` | [array slice selector](https://datatracker.ietf.org/doc/html/rfc9535#slice) |\n`[?]` | [filter selector](https://datatracker.ietf.org/doc/html/rfc9535#filter-selector): selects particular children using a logical expression | \n`@` | [current node identifier](https://datatracker.ietf.org/doc/html/rfc9535#filter-selector) (valid only within filter selectors) | `$.bar[?@.baz==42]`\n\n**References for JSONPath**\n- RFC 9535: https://datatracker.ietf.org/doc/html/rfc9535\n- Historic site: https://goessner.net/articles/JsonPath/\n- Node.js implementation: https://www.npmjs.com/package/jsonpath\n- Java implementation: https://github.com/json-path/JsonPath\n- Online evaluator: https://jsonpath.com/\n " } } } \ No newline at end of file diff --git a/vocabularies/Org.OData.JSON.V1.md b/vocabularies/Org.OData.JSON.V1.md index cf0bcacc..8cf6ee15 100644 --- a/vocabularies/Org.OData.JSON.V1.md +++ b/vocabularies/Org.OData.JSON.V1.md @@ -1,17 +1,178 @@ # JSON Vocabulary **Namespace: [Org.OData.JSON.V1](Org.OData.JSON.V1.xml)** -Terms for JSON properties +Terms, types, and functions for JSON data + +OData [stream properties](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_ManagingStreamProperties) allow embedding data of arbitrary media types, +and the OData JSON format allows [direct embedding of JSON data](https://docs.oasis-open.org/odata/odata-json-format/v4.01/odata-json-format-v4.01.html#sec_StreamProperty) in request and response payloads. + +This vocabulary defines a convenience [type for JSON data](#JSON) as well as a term for referencing a [JSON Schema](#Schema) describing the structure of the JSON data. + +In addition it defines two functions for [querying](#query) JSON data and using a [primitive value](#value) extracted from JSON data in common expressions, for example in `$filter`, `$orderby`, or `$compute`. + +**Example** + +The `Employees` entity set has a JSON data property `resume` (see [CSDL JSON](../examples/Org.OData.JSON.V1.Schema-sample.json) or [CSDL XML](../examples/Org.OData.JSON.V1.Schema-sample.xml)). + +One of its entities has a `resume` value of +```json +{ + "ssn": "1234", + "lastname": "Doe", + "address": { + "zipcode": "10022", + "street": "ABC st" + }, + "experience": "excellent" +} +``` + +This allows to filter and sort by values in that resume, and extract parts of the resume as a dynamic JSON data property +```http +GET http://www.example.com/mycompany/Employees + ?$filter=resume/JSON.value(path='$.lastname') eq 'Doe' + &$orderby=resume/JSON.valueNumber(path='$.experience') + &$compute=resume/JSON.query(path='$.address') as address + &$expand=address +``` +receiving +```json +{ + "@odata.context": "$metadata#Employees", + "value": [ + { + "empid": 4711, + "address": { + "zipcode": "10022", + "street": "ABC st" + } + }, + ... + ] +} +``` + ## Terms Term|Type|Description :---|:---|:---------- -[Schema](Org.OData.JSON.V1.xml#L67)|[JSON](#JSON)|The JSON Schema for JSON values of the annotated media entity type, property, parameter, return type, term, or type definition
The schema can be a schema reference, i.e. `{"$ref":"url/of/schemafile#/path/to/schema/within/schemafile"}` +[Schema](Org.OData.JSON.V1.xml#L119)|[JSON](#JSON)|The JSON Schema for JSON values of the annotated media entity type, property, parameter, return type, term, or type definition
The schema can be a reference, i.e. `{"$ref":"url/of/schemafile#/path/to/schema/within/schemafile"}` + + +## Functions + + +### [query](Org.OData.JSON.V1.xml#L127) + +Query a stream value of media type `application/json`, returning a stream value of media type `application/json` + +Extracts a JSON value, such as an array, object, or a JSON scalar value (string, number, boolean, or `null`) from the `input` JSON value: +- If `path` only consists of the root identifier followed by name and index selectors, it returns the identified single node within `input`, or `null` if no node is identified. +- If `path` potentially identifies multiple nodes within `input` (by using descendant, wildcard, union, array subset, or filter selectors), it returns an array containing the identified nodes, or an empty array if no node is identified. +- If `input` is not a valid JSON value, the function returns `null`. +- If `path` is `null`, not a valid [JSONPath expression](#Path), or does not match the structure of `input` (for example applying an index selector to a scalar value), the function returns `null`. + + +Parameter|Type|Description +:--------|:---|:---------- +**[input](Org.OData.JSON.V1.xml#L137)**|[JSON?](#JSON)|**Binding parameter:** JSON input +[path](Org.OData.JSON.V1.xml#L140)|[Path?](#Path)|JSONPath expression to be applied to value of `expr` +[→](Org.OData.JSON.V1.xml#L144)|[JSON?](#JSON)|JSON value resulting from applying `path` to `input` + + + +### [value](Org.OData.JSON.V1.xml#L150) + +Query a stream value of media type `application/json`, returning a string + +Extracts a single OData primitive value from the `input` JSON value and casts it to a string: +- If `path` only consists of the root identifier followed by name and index selectors and identifies a single scalar JSON value (string, number, boolean, or `null`) within `input`, it returns the identified single value, cast to a string. +- If `path` identifies multiple nodes within `input` (by using descendant, wildcard, union, array subset, or filter selectors), identifies an object or array, or does not identify any node, the function returns `null`. +- If `input` is not a valid JSON value, the function returns `null`. +- If `path` is `null`, not a valid [JSONPath expression](#Path), or does not match the structure of `input` (for example applying an index selector to a scalar value), the function returns `null`. + +Parameter|Type|Description +:--------|:---|:---------- +**[input](Org.OData.JSON.V1.xml#L159)**|[JSON?](#JSON)|**Binding parameter:** JSON input +[path](Org.OData.JSON.V1.xml#L162)|[Path?](#Path)|JSONPath expression to be applied to value of `expr` +[→](Org.OData.JSON.V1.xml#L166)|String?|String value resulting from applying `path` to `input` + + + +### [valueNumber](Org.OData.JSON.V1.xml#L171) + +Query a stream value of media type `application/json`, returning a number + +Like [`value`](#value), but casts the extracted value to an `Edm.Decimal` with unspecified precision and floating scale. + Returns null if that cast fails. + +Parameter|Type|Description +:--------|:---|:---------- +**[input](Org.OData.JSON.V1.xml#L177)**|[JSON?](#JSON)|**Binding parameter:** JSON input +[path](Org.OData.JSON.V1.xml#L180)|[Path?](#Path)|JSONPath expression to be applied to value of `expr` +[→](Org.OData.JSON.V1.xml#L183)|Decimal?|Numeric value resulting from applying `path` to `input` + + + +### [valueBoolean](Org.OData.JSON.V1.xml#L187) + +Query a stream value of media type `application/json`, returning a Boolean + +Like [`value`](#value), but casts the extracted value to an `Edm.Boolean`. + Returns null if that cast fails. + +Parameter|Type|Description +:--------|:---|:---------- +**[input](Org.OData.JSON.V1.xml#L193)**|[JSON?](#JSON)|**Binding parameter:** JSON input +[path](Org.OData.JSON.V1.xml#L196)|[Path?](#Path)|JSONPath expression to be applied to value of `expr` +[→](Org.OData.JSON.V1.xml#L199)|Boolean?|Boolean value resulting from applying `path` to `input` + -## [JSON](Org.OData.JSON.V1.xml#L75) +## [JSON](Org.OData.JSON.V1.xml#L204) **Type:** Stream Textual data of media type `application/json` + + +## [Path](Org.OData.JSON.V1.xml#L215) +**Type:** String + +[JSONPath](https://datatracker.ietf.org/doc/html/rfc9535) expression + +Implementations MUST support at least the following subset of JSONPath: + +Syntax Element | Description | Examples +---------------|-------------|-------- +`$` | [root identifier](https://datatracker.ietf.org/doc/html/rfc9535#root-identifier) | `$` +`[]` | [child segment](https://datatracker.ietf.org/doc/html/rfc9535#child-segment) selects one child of a node; contains one [name selector](https://datatracker.ietf.org/doc/html/rfc9535#name-selector) (single- or double-quoted string using JSON escaping rules) or [index selector](https://datatracker.ietf.org/doc/html/rfc9535#index-selector) (non-negative decimal integer) | `$['foo']`, `$.foo["bar"]`, `$.bar[0]`, `$.bar[42]` +`.name` | shorthand for `['name']` | `$.foo`, `$.foo.bar`, `$.bar[42].baz` + +Implementations MAY in addition support other JSONPath constructs, for example: + +Syntax Element | Description | Examples +---------------|-------------|-------- +`[]` | index selector with negative integer array index (counts from the end of the array) | `$.bar[-1]` +`[]` | non-empty, comma-separated sequence of selectors | `$.foo['bar','baz']`, `$.bar[0,1,2,3,5,7,11]` +`..[]` | [descendant segment](https://datatracker.ietf.org/doc/html/rfc9535#descendant-segment): selects zero or more descendants of a node | `$.foo..["bar"]` +`..name` | shorthand for `..['name']` | `$.foo..bar` +`*` | [wildcard selector](https://datatracker.ietf.org/doc/html/rfc9535#name-selector): selects all children of a node | `$.foo[*]`, `$[*]` +`.*` | shorthand for `[*]` | `$.foo.*`, `$.*` +`..*` | shorthand for `..[*]` | `$.foo..*`, `$..*` +`[start:end]` | array subset by range of indices (including the item at _start_ and excluding the item at _end_ | `$.bar[2:5]`, same as `$.bar[2,3,4]` +`[start:]` | array subset from _start_ to end of array | `$.bar[2:]` +`[:n]` | the first _n_ array items | `$.bar[:4]` +`[-n:]` | the last _n_ array items | `$.bar[-3:]` +`[start:end:step]` | [array slice selector](https://datatracker.ietf.org/doc/html/rfc9535#slice) | +`[?]` | [filter selector](https://datatracker.ietf.org/doc/html/rfc9535#filter-selector): selects particular children using a logical expression | +`@` | [current node identifier](https://datatracker.ietf.org/doc/html/rfc9535#filter-selector) (valid only within filter selectors) | `$.bar[?@.baz==42]` + +**References for JSONPath** +- RFC 9535: https://datatracker.ietf.org/doc/html/rfc9535 +- Historic site: https://goessner.net/articles/JsonPath/ +- Node.js implementation: https://www.npmjs.com/package/jsonpath +- Java implementation: https://github.com/json-path/JsonPath +- Online evaluator: https://jsonpath.com/ + diff --git a/vocabularies/Org.OData.JSON.V1.xml b/vocabularies/Org.OData.JSON.V1.xml index 5b11dda6..bc37d7e2 100644 --- a/vocabularies/Org.OData.JSON.V1.xml +++ b/vocabularies/Org.OData.JSON.V1.xml @@ -45,8 +45,60 @@ - Terms for JSON properties + Terms, types, and functions for JSON data + + OData [stream properties](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_ManagingStreamProperties) allow embedding data of arbitrary media types, +and the OData JSON format allows [direct embedding of JSON data](https://docs.oasis-open.org/odata/odata-json-format/v4.01/odata-json-format-v4.01.html#sec_StreamProperty) in request and response payloads. + +This vocabulary defines a convenience [type for JSON data](#JSON) as well as a term for referencing a [JSON Schema](#Schema) describing the structure of the JSON data. + +In addition it defines two functions for [querying](#query) JSON data and using a [primitive value](#value) extracted from JSON data in common expressions, for example in `$filter`, `$orderby`, or `$compute`. + +**Example** + +The `Employees` entity set has a JSON data property `resume` (see [CSDL JSON](../examples/Org.OData.JSON.V1.Schema-sample.json) or [CSDL XML](../examples/Org.OData.JSON.V1.Schema-sample.xml)). + +One of its entities has a `resume` value of +```json +{ + "ssn": "1234", + "lastname": "Doe", + "address": { + "zipcode": "10022", + "street": "ABC st" + }, + "experience": "excellent" +} +``` + +This allows to filter and sort by values in that resume, and extract parts of the resume as a dynamic JSON data property +```http +GET http://www.example.com/mycompany/Employees + ?$filter=resume/JSON.value(path='$.lastname') eq 'Doe' + &$orderby=resume/JSON.valueNumber(path='$.experience') + &$compute=resume/JSON.query(path='$.address') as address + &$expand=address +``` +receiving +```json +{ + "@odata.context": "$metadata#Employees", + "value": [ + { + "empid": 4711, + "address": { + "zipcode": "10022", + "street": "ABC st" + } + }, + ... + ] +} +``` + + + @@ -68,10 +120,87 @@ - The schema can be a schema reference, i.e. `{"$ref":"url/of/schemafile#/path/to/schema/within/schemafile"}` + The schema can be a reference, i.e. `{"$ref":"url/of/schemafile#/path/to/schema/within/schemafile"}` + + + + Extracts a JSON value, such as an array, object, or a JSON scalar value (string, number, boolean, or `null`) from the `input` JSON value: +- If `path` only consists of the root identifier followed by name and index selectors, it returns the identified single node within `input`, or `null` if no node is identified. +- If `path` potentially identifies multiple nodes within `input` (by using descendant, wildcard, union, array subset, or filter selectors), it returns an array containing the identified nodes, or an empty array if no node is identified. +- If `input` is not a valid JSON value, the function returns `null`. +- If `path` is `null`, not a valid [JSONPath expression](#Path), or does not match the structure of `input` (for example applying an index selector to a scalar value), the function returns `null`. + + + + + + + + + + + + + + + + + Extracts a single OData primitive value from the `input` JSON value and casts it to a string: +- If `path` only consists of the root identifier followed by name and index selectors and identifies a single scalar JSON value (string, number, boolean, or `null`) within `input`, it returns the identified single value, cast to a string. +- If `path` identifies multiple nodes within `input` (by using descendant, wildcard, union, array subset, or filter selectors), identifies an object or array, or does not identify any node, the function returns `null`. +- If `input` is not a valid JSON value, the function returns `null`. +- If `path` is `null`, not a valid [JSONPath expression](#Path), or does not match the structure of `input` (for example applying an index selector to a scalar value), the function returns `null`. + + + + + + + + + + + + + + + Like [`value`](#value), but casts the extracted value to an `Edm.Decimal` with unspecified precision and floating scale. + Returns null if that cast fails. + + + + + + + + + + + + + + + Like [`value`](#value), but casts the extracted value to an `Edm.Boolean`. + Returns null if that cast fails. + + + + + + + + + + + + @@ -82,6 +211,48 @@ + + + + + Implementations MUST support at least the following subset of JSONPath: + +Syntax Element | Description | Examples +---------------|-------------|-------- +`$` | [root identifier](https://datatracker.ietf.org/doc/html/rfc9535#root-identifier) | `$` +`[<selector>]` | [child segment](https://datatracker.ietf.org/doc/html/rfc9535#child-segment) selects one child of a node; contains one [name selector](https://datatracker.ietf.org/doc/html/rfc9535#name-selector) (single- or double-quoted string using JSON escaping rules) or [index selector](https://datatracker.ietf.org/doc/html/rfc9535#index-selector) (non-negative decimal integer) | `$['foo']`, `$.foo["bar"]`, `$.bar[0]`, `$.bar[42]` +`.name` | shorthand for `['name']` | `$.foo`, `$.foo.bar`, `$.bar[42].baz` + +Implementations MAY in addition support other JSONPath constructs, for example: + +Syntax Element | Description | Examples +---------------|-------------|-------- +`[<selector>]` | index selector with negative integer array index (counts from the end of the array) | `$.bar[-1]` +`[<selectors>]` | non-empty, comma-separated sequence of selectors | `$.foo['bar','baz']`, `$.bar[0,1,2,3,5,7,11]` +`..[<selectors>]` | [descendant segment](https://datatracker.ietf.org/doc/html/rfc9535#descendant-segment): selects zero or more descendants of a node | `$.foo..["bar"]` +`..name` | shorthand for `..['name']` | `$.foo..bar` +`*` | [wildcard selector](https://datatracker.ietf.org/doc/html/rfc9535#name-selector): selects all children of a node | `$.foo[*]`, `$[*]` +`.*` | shorthand for `[*]` | `$.foo.*`, `$.*` +`..*` | shorthand for `..[*]` | `$.foo..*`, `$..*` +`[start:end]` | array subset by range of indices (including the item at _start_ and excluding the item at _end_ | `$.bar[2:5]`, same as `$.bar[2,3,4]` +`[start:]` | array subset from _start_ to end of array | `$.bar[2:]` +`[:n]` | the first _n_ array items | `$.bar[:4]` +`[-n:]` | the last _n_ array items | `$.bar[-3:]` +`[start:end:step]` | [array slice selector](https://datatracker.ietf.org/doc/html/rfc9535#slice) | +`[?<logical-expr>]` | [filter selector](https://datatracker.ietf.org/doc/html/rfc9535#filter-selector): selects particular children using a logical expression | +`@` | [current node identifier](https://datatracker.ietf.org/doc/html/rfc9535#filter-selector) (valid only within filter selectors) | `$.bar[?@.baz==42]` + +**References for JSONPath** +- RFC 9535: https://datatracker.ietf.org/doc/html/rfc9535 +- Historic site: https://goessner.net/articles/JsonPath/ +- Node.js implementation: https://www.npmjs.com/package/jsonpath +- Java implementation: https://github.com/json-path/JsonPath +- Online evaluator: https://jsonpath.com/ + + + +