diff --git a/docs/odata-csdl-json/odata-csdl-json.html b/docs/odata-csdl-json/odata-csdl-json.html index f5ea66c0..e05c7694 100644 --- a/docs/odata-csdl-json/odata-csdl-json.html +++ b/docs/odata-csdl-json/odata-csdl-json.html @@ -459,26 +459,31 @@
If
without else part in collections$Nullable
For other collection-valued return types the result will always be a collection that MAY be empty. In this case $Nullable
applies to items of the collection and specifies whether the collection MAY contain null
values.
For single-valued return types the value true
means that the action or function MAY return a single null
value. The value false
means that the action or function will never return a null
value and instead will fail with an error response if it cannot compute a result.
Core.IsDelta
An action or function that returns a single entity or a collection of entities MAY return results as a delta payload. This is indicated by annotating the return type with the term Core.IsDelta
.
Delta payloads represent changes between two versions of data and, in addition to current values, MAY include deleted entities as well as changes to related entities and relationships, according to the format-specific delta representation.
MaxLength
, Precision
, Scale
, or SRID
can be used as appropriate to specify value restrictions of the parameter, as well as the Unicode
facet for 4.01 or greater payloads.
For single-valued parameters the facets apply to the parameter value. If the parameter value is a collection, the facets apply to the items in the collection.
$Parameter
$Parameter
The value of $Parameter
is an array. The array contains one object per parameter.
A parameter object MUST contain the member $Name
, and it MAY contain the members $Type
, $Collection
, $Nullable
, $MaxLength
, $Unicode
, $Precision
, $Scale
, and $SRID
.
$Nullable
For single-valued parameters the value true
means that the parameter accepts a null
value.
For collection-valued parameters the parameter value will always be a collection that MAY be empty. In this case $Nullable
applies to items of the collection and specifies whether the collection MAY contain null
values.
Core.OptionalParameter
A parameter that is annotated with the term Core.OptionalParameter
MAY be omitted when invoking the function or action.
All parameters marked as optional MUST come after any parameters not marked as optional. The binding parameter MUST NOT be marked as optional.
Example 30: a function returning the top-selling products for a given year. In this case the year must be specified as a parameter of the function with the $Parameter
member.
"TopSellingProducts": [
@@ -2058,6 +2069,9 @@ $Nullable
}
]
Core.IsDelta
A parameter that accepts a single entity or a collection of entities MAY accept a delta representation. This is indicated by annotating the parameter with the term Core.IsDelta
.
Deltas represent changes between two versions of data and, in addition to current values, MAY include deleted entities as well as changes to related entities and relationships, according to the format-specific delta representation.
Parameter
Property
$Type
$Collection
$Nullable
$Parameter
Core.IsDelta
$Parameter
$Type
$Collection
$Nullable
Core.OptionalParameter
Core.IsDelta
If
without else part in collectionsNullable
attribute applies to items of the collection and specifies whether the collection MAY contain null
values.
For single-valued return types the value true
means that the action or function MAY return a single null
value. The value false
means that the action or function will never return a null
value and instead will fail with an error response if it cannot compute a result.
Core.IsDelta
An action or function that returns a single entity or a collection of entities MAY return results as a delta payload. This is indicated by annotating the return type with the term Core.IsDelta
.
Delta payloads represent changes between two versions of data and, in addition to current values, MAY include deleted entities as well as changes to related entities and relationships, according to the format-specific delta representation.
Nullable
is one of the Boolean literals true
or false
. Absence of the attribute means true
.
The value true
means that the parameter accepts a null
value.
Core.OptionalParameter
A parameter that is annotated with the term Core.OptionalParameter
MAY be omitted when invoking the function or action.
All parameters marked as optional MUST come after any parameters not marked as optional. The binding parameter MUST NOT be marked as optional.
Example 30: a function returning the top-selling products for a given year. In this case the year must be specified as a parameter of the function with the edm:Parameter
element.
Function Name="TopSellingProducts">
@@ -1926,6 +1937,9 @@ <Attribute ReturnType Type="Collection(self.Product)" />
Function> </ <
Core.IsDelta
A parameter that accepts a single entity or a collection of entities MAY accept a delta representation. This is indicated by annotating the parameter with the term Core.IsDelta
.
Deltas represent changes between two versions of data and, in addition to current values, MAY include deleted entities as well as changes to related entities and relationships, according to the format-specific delta representation.
Parameter
Property
Type
Nullable
Core.IsDelta
edm:Parameter
edm:EntityContainer
nextLink
(odata.nextLink
)The nextLink
control information indicates that a response is only a subset of the requested collection. It contains a URL that allows retrieving the next subset of the requested collection.
This control information can also be applied to expanded to-many navigation properties.
+This control information can also be applied to expanded to-many navigation properties and to collections of primitive or complex values.
delta
(odata.delta
)$all
Response$crossjoin
ResponseContext URL template:
{context-url}#{entity-set}{/type-name}{select-list}/$delta
@@ -1577,10 +1577,10 @@ update request body for a collection of entities is simply the fragment #$delta
.
Context URL templates:
{context-url}#{entity-set}/$deletedEntity
@@ -2100,7 +2100,7 @@ 11.2.6.7 Server-Driven Paging
-Responses that include only a partial set of the items identified by the request URL MUST contain a link that allows retrieving the next partial set of items. This link is called a next link; its representation is format-specific. The final partial set of items MUST NOT contain a next link.
+Responses that include only a partial set of the items identified by the request URL MUST contain a link that allows retrieving the next partial set of items. This link is called a next link; its representation is format-specific. The final partial set of items MUST NOT contain a next link. Clients MUST check for next links before assuming to have received all items within a collection, including expanded and nested collections.
The client can request a maximum page size through the maxpagesize
preference. The service may apply this requested page size or implement a page size different than, or in the absence of, this preference.
OData clients MUST treat the URL of the next link as opaque, and MUST NOT append system query options to the URL of a next link. Services may not allow a change of format on requests for subsequent pages using the next link. Clients therefore SHOULD request the same format on subsequent page requests using a compatible Accept
header. OData services may use the reserved system query option $skiptoken
when building next links. Its content is opaque, service-specific, and must only follow the rules for URL query parts.
OData clients MUST NOT use the system query option $skiptoken
when constructing requests.
diff --git a/docs/odata-protocol/odata-protocol.md b/docs/odata-protocol/odata-protocol.md
index 6e09298a..c323ff53 100644
--- a/docs/odata-protocol/odata-protocol.md
+++ b/docs/odata-protocol/odata-protocol.md
@@ -195,8 +195,8 @@ For complete copyright information please see the full Notices section in an App
- [10.14 Collection of Complex or Primitive Types](#CollectionofComplexorPrimitiveTypes)
- [10.15 Complex or Primitive Type](#ComplexorPrimitiveType)
- [10.16 Operation Result](#OperationResult)
- - [10.17 Delta Payload Response](#DeltaPayloadResponse)
- - [10.18 Item in a Delta Payload Response](#IteminaDeltaPayloadResponse)
+ - [10.17 Delta Payload](#DeltaPayload)
+ - [10.18 Item in a Delta Payload](#IteminaDeltaPayload)
- [10.19 `$all` Response](#allResponse)
- [10.20 `$crossjoin` Response](#crossjoinResponse)
- [11 Data Service Requests](#DataServiceRequests)
@@ -2496,7 +2496,7 @@ http://host/service/$metadata#Customers
```
:::
-## 10.17 Delta Payload Response
+## 10.17 Delta Payload
Context URL template:
@@ -2522,10 +2522,10 @@ http://host/service/$metadata#Customers/$delta
```
:::
-The context URL of an update request body for a collection of entities
+The context URL of an [update request body for a collection of entities](#UpdateaCollectionofEntities)
is simply the fragment `#$delta`.
-## 10.18 Item in a Delta Payload Response
+## 10.18 Item in a Delta Payload
Context URL templates:
@@ -3555,7 +3555,8 @@ Responses that include only a partial set of the items identified by the
request URL MUST contain a link that allows retrieving the next partial
set of items. This link is called a *next link*; its representation is
format-specific. The final partial set of items MUST NOT contain a next
-link.
+link. Clients MUST check for next links before assuming to have received
+all items within a collection, including expanded and nested collections.
The client can request a maximum page size through the
[`maxpagesize`](#Preferencemaxpagesizeodatamaxpagesize) preference. The
diff --git a/docs/odata-url-conventions/odata-url-conventions.html b/docs/odata-url-conventions/odata-url-conventions.html
index a18a9242..12226e4d 100644
--- a/docs/odata-url-conventions/odata-url-conventions.html
+++ b/docs/odata-url-conventions/odata-url-conventions.html
@@ -441,6 +441,11 @@ 441
$search
syntax$compute
, $select
, $expand
, and $levels
for all navigation properties, plus $filter
, $orderby
, $skip
, $top
, $count
, and $search
for collection-valued navigation properties.
+Query options can be applied to an expanded navigation property by appending a semicolon-separated list of query options, enclosed in parentheses, to the navigation property name. The system query option, irrespective of casing or whether or not it is prefixed with a $
, MUST NOT be specified more than once in the list. Allowed system query options are $compute
, $select
, $expand
, and $levels
for all navigation properties, plus $filter
, $orderby
, $skip
, $top
, $count
, and $search
for collection-valued navigation properties.
Example 124: all categories and for each category all related products with a discontinued date equal to null
http://host/service/Categories?$expand=Products($filter=DiscontinuedDate eq null)
diff --git a/docs/odata-url-conventions/odata-url-conventions.md b/docs/odata-url-conventions/odata-url-conventions.md
index 96ce04c2..7bb811cc 100644
--- a/docs/odata-url-conventions/odata-url-conventions.md
+++ b/docs/odata-url-conventions/odata-url-conventions.md
@@ -272,6 +272,7 @@ Section | Feature / Change | Issue
--------|------------------|------
[Section 4.17](#PassingQueryOptionsintheRequestBody)| `POST ~/$query` with `Content-Type: application/x-www-form-urlencoded` or `application/json`| [320](https://github.com/oasis-tcs/odata-specs/issues/320), [371](https://github.com/oasis-tcs/odata-specs/issues/371)
[Section 5.1.1.7.1](#matchespattern)| New overload for function `matchespattern` with flags| [441](https://github.com/oasis-tcs/odata-specs/issues/441)
+[Section 5.1.3](#SystemQueryOptionexpand)| Nested query options can only appear once per expand item| [2004](https://github.com/oasis-tcs/odata-specs/issues/2004)
[Section 5.1.8](#SystemQueryOptionsearch)| Allow alternative `$search` syntax| [293](https://github.com/oasis-tcs/odata-specs/issues/293)
## 1.2 Glossary
@@ -3623,6 +3624,8 @@ A path MUST NOT appear in more than one expand item.
Query options can be applied to an expanded navigation property by
appending a semicolon-separated list of query options, enclosed in
parentheses, to the navigation property name.
+The system query option, irrespective of casing or whether or not it is prefixed with a `$`,
+MUST NOT be specified more than once in the list.
Allowed system query options are
[`$compute`](#SystemQueryOptioncompute),
[`$select`](#SystemQueryOptionselect),
diff --git a/odata-csdl/1 Introduction.md b/odata-csdl/1 Introduction.md
index 385a4ae0..9bdb1481 100644
--- a/odata-csdl/1 Introduction.md
+++ b/odata-csdl/1 Introduction.md
@@ -46,6 +46,7 @@ SRID value `variable` is deprecated|
All children of `edm:EntityContainer` are optional|
[464](https://github.com/oasis-tcs/odata-specs/issues/464)
:
+[Section ##ActionandFunction] | Actions and functions can take, and return, delta payloads | [348](https://github.com/oasis-tcs/odata-specs/issues/348)
[Section ##GeoValues] | Constant Geo values in annotations | [654](https://github.com/oasis-tcs/odata-specs/issues/654)
[Section ##StreamValues] | Constant Stream values in annotations | [654](https://github.com/oasis-tcs/odata-specs/issues/654)
[Section ##PathEvaluation]|
diff --git a/odata-csdl/12 Action and Function.md b/odata-csdl/12 Action and Function.md
index 99c0b3ac..deea8a82 100644
--- a/odata-csdl/12 Action and Function.md
+++ b/odata-csdl/12 Action and Function.md
@@ -328,6 +328,15 @@ the action or function will never return a `null` value and instead will
fail with an error response if it cannot compute a result.
:::
+### ##subisec Annotation `Core.IsDelta`
+
+An action or function that returns a single entity or a collection of entities MAY return results as a delta payload.
+This is indicated by annotating the return type with the term [`Core.IsDelta`]($$$OData-VocCore$$$#IsDelta).
+
+Delta payloads represent changes between two versions of data and, in addition
+to current values, MAY include deleted entities as well as changes to related
+entities and relationships, according to the format-specific delta representation.
+
## ##subsec Parameter
An action or function overload MAY specify parameters.
@@ -397,32 +406,6 @@ of the collection and specifies whether the collection MAY contain
`null` values.
:::
-::: {.varjson .example}
-Example ##ex: a function returning the top-selling products for a given
-year. In this case the year must be specified as a parameter of the
-function with the `$Parameter` member.
-```json
-"TopSellingProducts": [
- {
- "$Kind": "Function",
- "$Parameter": [
- {
- "$Name": "Year",
- "$Nullable": true,
- "$Type": "Edm.Decimal",
- "$Precision": 4,
- "$Scale": 0
- }
- ],
- "$ReturnType": {
- "$Collection": true,
- "$Type": "self.Product"
- }
- }
-]
-```
-:::
-
::: {.varxml .rep}
### ##isec Element `edm:Parameter`
@@ -454,6 +437,41 @@ The value of `Nullable` is one of the Boolean literals `true` or
The value `true` means that the parameter accepts a `null` value.
:::
+### ##subisec Annotation `Core.OptionalParameter`
+
+A parameter that is annotated with the term
+[`Core.OptionalParameter`]($$$OData-VocCore$$$#OptionalParameter) MAY be
+omitted when invoking the function or action.
+
+All parameters marked as optional MUST come after any parameters not marked as optional.
+
+The binding parameter MUST NOT be marked as optional.
+
+::: {.varjson .example}
+Example ##ex: a function returning the top-selling products for a given
+year. In this case the year must be specified as a parameter of the
+function with the `$Parameter` member.
+```json
+"TopSellingProducts": [
+ {
+ "$Kind": "Function",
+ "$Parameter": [
+ {
+ "$Name": "Year",
+ "$Nullable": true,
+ "$Type": "Edm.Decimal",
+ "$Precision": 4,
+ "$Scale": 0
+ }
+ ],
+ "$ReturnType": {
+ "$Collection": true,
+ "$Type": "self.Product"
+ }
+ }
+]
+```
+:::
::: {.varxml .example}
Example ##ex: a function returning the top-selling products for a given
year. In this case the year must be specified as a parameter of the
@@ -465,3 +483,12 @@ function with the `edm:Parameter` element.
```
:::
+
+### ##subisec Annotation `Core.IsDelta`
+
+A parameter that accepts a single entity or a collection of entities MAY accept a delta representation.
+This is indicated by annotating the parameter with the term [`Core.IsDelta`]($$$OData-VocCore$$$#IsDelta).
+
+Deltas represent changes between two versions of data and, in addition
+to current values, MAY include deleted entities as well as changes to related
+entities and relationships, according to the format-specific delta representation.
diff --git a/odata-csdl/14 Vocabulary and Annotation.md b/odata-csdl/14 Vocabulary and Annotation.md
index c55ed3bc..73801ec6 100644
--- a/odata-csdl/14 Vocabulary and Annotation.md
+++ b/odata-csdl/14 Vocabulary and Annotation.md
@@ -324,7 +324,7 @@ Symbolic Value|Model Element
`NavigationProperty` |Navigation Property
`Null` |Null annotation expression
`OnDelete` |On-Delete Action of a navigation property
-`Parameter` |Action of Function Parameter
+`Parameter` |Action or Function Parameter
`Property` |Structural Property
`PropertyValue` |Property value of a Record annotation expression
`Record` |Record annotation expression
diff --git a/odata-json-format/4 Common Characteristics.md b/odata-json-format/4 Common Characteristics.md
index 98448833..daa44aa1 100644
--- a/odata-json-format/4 Common Characteristics.md
+++ b/odata-json-format/4 Common Characteristics.md
@@ -376,7 +376,9 @@ is only a subset of the requested collection. It contains a [URL](URLsinMessageB
allows retrieving the next subset of the requested collection.
This control information can also be applied to [expanded to-many
-navigation properties](#ExpandedNavigationProperty).
+navigation properties](#ExpandedNavigationProperty) and to collections of
+[primitive](#CollectionofPrimitiveValues) or [complex](#CollectionofComplexValues)
+values.
### ##subsubsec Control Information: `delta` (`odata.delta`)
diff --git a/odata-protocol/10 Context URL.md b/odata-protocol/10 Context URL.md
index 890a0606..5ad8ce5a 100644
--- a/odata-protocol/10 Context URL.md
+++ b/odata-protocol/10 Context URL.md
@@ -519,7 +519,7 @@ http://host/service/$metadata#Customers
```
:::
-## ##subsec Delta Payload Response
+## ##subsec Delta Payload
Context URL template:
@@ -545,10 +545,10 @@ http://host/service/$metadata#Customers/$delta
```
:::
-The context URL of an update request body for a collection of entities
+The context URL of an [update request body for a collection of entities](#UpdateaCollectionofEntities)
is simply the fragment `#$delta`.
-## ##subsec Item in a Delta Payload Response
+## ##subsec Item in a Delta Payload
Context URL templates:
diff --git a/odata-protocol/11 Data Service Requests.md b/odata-protocol/11 Data Service Requests.md
index e122e92a..3a5f12d7 100644
--- a/odata-protocol/11 Data Service Requests.md
+++ b/odata-protocol/11 Data Service Requests.md
@@ -993,7 +993,8 @@ Responses that include only a partial set of the items identified by the
request URL MUST contain a link that allows retrieving the next partial
set of items. This link is called a *next link*; its representation is
format-specific. The final partial set of items MUST NOT contain a next
-link.
+link. Clients MUST check for next links before assuming to have received
+all items within a collection, including expanded and nested collections.
The client can request a maximum page size through the
[`maxpagesize`](#Preferencemaxpagesizeodatamaxpagesize) preference. The
diff --git a/odata-url-conventions/1 Introduction.md b/odata-url-conventions/1 Introduction.md
index e759d0a4..5a141e69 100644
--- a/odata-url-conventions/1 Introduction.md
+++ b/odata-url-conventions/1 Introduction.md
@@ -32,6 +32,9 @@ Section | Feature / Change | Issue
[Section ##matchespattern]|
New overload for function `matchespattern` with flags|
[441](https://github.com/oasis-tcs/odata-specs/issues/441)
+[Section ##SystemQueryOptionexpand]|
+Nested query options can only appear once per expand item|
+[2004](https://github.com/oasis-tcs/odata-specs/issues/2004)
[Section ##SystemQueryOptionsearch]|
Allow alternative `$search` syntax|
[293](https://github.com/oasis-tcs/odata-specs/issues/293)
diff --git a/odata-url-conventions/5 Query Options.md b/odata-url-conventions/5 Query Options.md
index 42354e58..4222a8dc 100644
--- a/odata-url-conventions/5 Query Options.md
+++ b/odata-url-conventions/5 Query Options.md
@@ -2050,6 +2050,8 @@ A path MUST NOT appear in more than one expand item.
Query options can be applied to an expanded navigation property by
appending a semicolon-separated list of query options, enclosed in
parentheses, to the navigation property name.
+The system query option, irrespective of casing or whether or not it is prefixed with a `$`,
+MUST NOT be specified more than once in the list.
Allowed system query options are
[`$compute`](#SystemQueryOptioncompute),
[`$select`](#SystemQueryOptionselect),
diff --git a/package-lock.json b/package-lock.json
index e8591d31..643ad09a 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -3101,7 +3101,7 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
"integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
- "license": "MIT",
+ "license": "MIT",
"engines": {
"node": ">= 0.8"
}