From 2041e08ee7e3dea8945176f03fb12ecd82d680a4 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Thu, 24 Oct 2024 11:30:04 +0200 Subject: [PATCH 1/7] /$count --- odata-protocol/1 Introduction.md | 1 + odata-protocol/11 Data Service Requests.md | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/odata-protocol/1 Introduction.md b/odata-protocol/1 Introduction.md index e8a0d0b6..8127446e 100644 --- a/odata-protocol/1 Introduction.md +++ b/odata-protocol/1 Introduction.md @@ -30,6 +30,7 @@ Section | Feature / Change | Issue [Section ##CollectionofEntities]| Context URLs use parentheses-style keys without percent-encoding| [368](https://github.com/oasis-tcs/odata-specs/issues/368) +[Section ##RequestingtheNumberofItemsinaCollection]| Only digits in a response to `/$count` | [325](https://github.com/oasis-tcs/odata-specs/issues/325) [Section ##DataModification]| Response code `204 No Content` after successful data modification if requested response could not be constructed| [443](https://github.com/oasis-tcs/odata-specs/issues/443) diff --git a/odata-protocol/11 Data Service Requests.md b/odata-protocol/11 Data Service Requests.md index 1af41135..5ba42478 100644 --- a/odata-protocol/11 Data Service Requests.md +++ b/odata-protocol/11 Data Service Requests.md @@ -1145,8 +1145,10 @@ On success, the response body MUST contain the exact count of items matching the request after applying any [`$filter`](#SystemQueryOptionfilter) or [`$search`](#SystemQueryOptionsearch) system query options, formatted as -a simple primitive integer value with media type `text/plain`. Clients -SHOULD NOT combine the system query options +a simple primitive integer value with media type `text/plain` without `charset` parameter, +and the response body consisting only of octets `0x30` to `0x39`. + +Clients SHOULD NOT combine the system query options [`$top`](#SystemQueryOptiontop), [`$skip`](#SystemQueryOptionskip), [`$orderby`](#SystemQueryOptionorderby), From 36db9e1d9755b263022e79a80e8ff5a33e0041e1 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Thu, 24 Oct 2024 11:49:11 +0200 Subject: [PATCH 2/7] charset with /$value --- docs/odata-protocol/odata-protocol.html | 19 ++++++++++++++++--- docs/odata-protocol/odata-protocol.md | 22 ++++++++++++++-------- odata-protocol/1 Introduction.md | 3 ++- odata-protocol/11 Data Service Requests.md | 14 ++++++++------ 4 files changed, 40 insertions(+), 18 deletions(-) diff --git a/docs/odata-protocol/odata-protocol.html b/docs/odata-protocol/odata-protocol.html index 83fc639c..99043af2 100644 --- a/docs/odata-protocol/odata-protocol.html +++ b/docs/odata-protocol/odata-protocol.html @@ -574,6 +574,16 @@

368 +Section 11.2.4.2 +Use of charset parameter in responses to /$value +325 + + +Section 11.2.10 +Only digits in a response to /$count +325 + + Section 11.4 Response code 204 No Content after successful data modification if requested response could not be constructed 443 @@ -1743,8 +1753,10 @@

OData-URL document for details.

The Content-Type of the response is determined using the Accept header and the $format system query option.

The default format for Edm.Binary is the format specified by the Core.MediaType annotation (see OData-VocCore) if this annotation is present. If not annotated, the format cannot be predicted by the client.

-

The default format for Edm.Geo types is text/plain using the WKT (well-known text) format, see rules fullCollectionLiteral, fullLineStringLiteral, fullMultiPointLiteral, fullMultiLineStringLiteral, fullMultiPolygonLiteral, fullPointLiteral, and fullPolygonLiteral in OData-ABNF.

-

The default format for single primitive values except Edm.Binary and the Edm.Geo types is text/plain. Responses of type Edm.String can use the charset format parameter to specify the character set used for representing the string value. Responses for the other primitive types follow the rules booleanValue, byteValue, dateValue, dateTimeOffsetValue, decimalValue, doubleValue, durationValue, enumValue, guidValue, int16Value, int32Value, int64Value, sbyteValue, singleValue, and timeOfDayValue in OData-ABNF.

+

The default format for Edm.Geo types is text/plain without charset parameter, using the WKT (well-known text) format, see rules fullCollectionLiteral, fullLineStringLiteral, fullMultiPointLiteral, fullMultiLineStringLiteral, fullMultiPolygonLiteral, fullPointLiteral, and fullPolygonLiteral in OData-ABNF.

+

The default format for single primitive values except Edm.Binary and the Edm.Geo types is text/plain.

+

Responses for type Edm.String MAY use the charset format parameter to specify the character set used for representing the string value; omission of the charset parameter implies the default character set US-ASCII.

+

Responses for the other primitive types follow the rules booleanValue, byteValue, dateValue, dateTimeOffsetValue, decimalValue, doubleValue, durationValue, enumValue, guidValue, int16Value, int32Value, int64Value, sbyteValue, singleValue, and timeOfDayValue in OData-ABNF; they MUST NOT use the charset parameter which implies the default character set US-ASCII.

A raw value request for a property or operation result of type Edm.Stream returns 400 Bad Request.

A raw value request for a property or operation result that is null results in a 204 No Content response.

If the property or operation result is not available, for example due to permissions, the service responds with 404 Not Found.

@@ -2163,7 +2175,8 @@

11.2.10 Requesting the Number of Items in a Collection

To request only the number of items of a collection of entities or items of a collection-valued property, the client issues a GET request with /$count appended to the resource path of the collection.

-

On success, the response body MUST contain the exact count of items matching the request after applying any $filter or $search system query options, formatted as a simple primitive integer value with media type text/plain. Clients SHOULD NOT combine the system query options $top, $skip, $orderby, $expand, and $format with the path suffix /$count. The result of such a request is undefined.

+

On success, the response body MUST contain the exact count of items matching the request after applying any $filter or $search system query options, formatted as a simple primitive integer value with media type text/plain without charset parameter, and the response body consisting only of octets 0x30 to 0x39.

+

Clients SHOULD NOT combine the system query options $top, $skip, $orderby, $expand, and $format with the path suffix /$count. The result of such a request is undefined.

Example 69: return the number of products in the Products entity set

GET http://host/service/Products/$count
diff --git a/docs/odata-protocol/odata-protocol.md b/docs/odata-protocol/odata-protocol.md index 049d318e..7b63345a 100644 --- a/docs/odata-protocol/odata-protocol.md +++ b/docs/odata-protocol/odata-protocol.md @@ -356,6 +356,8 @@ Section | Feature / Change | Issue --------|------------------|------ [Section 8.2.8.3](#Preferencecontinueonerrorodatacontinueonerror) | Responses that include errors MUST include the `Preference-Applied` header with `continue-on-error` set to `true` | [1965](https://github.com/oasis-tcs/odata-specs/issues/1965) [Section 10.2](#CollectionofEntities)| Context URLs use parentheses-style keys without percent-encoding| [368](https://github.com/oasis-tcs/odata-specs/issues/368) +[Section 11.2.4.2](#RequestingaRawValueusingvalue)| Use of `charset` parameter in responses to `/$value` | [325](https://github.com/oasis-tcs/odata-specs/issues/325) +[Section 11.2.10](#RequestingtheNumberofItemsinaCollection)| Only digits in a response to `/$count` | [325](https://github.com/oasis-tcs/odata-specs/issues/325) [Section 11.4](#DataModification)| Response code `204 No Content` after successful data modification if requested response could not be constructed| [443](https://github.com/oasis-tcs/odata-specs/issues/443) [Section 11.4.2](#CreateanEntity)| Services can validate non-insertable property values in insert payloads| [356](https://github.com/oasis-tcs/odata-specs/issues/356) [Section 11.4.3](#UpdateanEntity)| Services can validate non-updatable property values in update payloads| [356](https://github.com/oasis-tcs/odata-specs/issues/356) @@ -2817,7 +2819,7 @@ annotation (see [OData-VocCore](#ODataVocCore)) if this annotation is present. If not annotated, the format cannot be predicted by the client. -The default format for `Edm.Geo` types is `text/plain` using the WKT +The default format for `Edm.Geo` types is `text/plain` without `charset` parameter, using the WKT (well-known text) format, see rules `fullCollectionLiteral`, `fullLineStringLiteral`, `fullMultiPointLiteral`, `fullMultiLineStringLiteral`, `fullMultiPolygonLiteral`, @@ -2825,14 +2827,16 @@ The default format for `Edm.Geo` types is `text/plain` using the WKT [OData-ABNF](#ODataABNF). The default format for single primitive values except `Edm.Binary` and -the `Edm.Geo` types is `text/plain`. Responses of type -`Edm.String` can use the `charset` format parameter to specify the -character set used for representing the string value. Responses for the -other primitive types follow the rules `booleanValue`, `byteValue`, +the `Edm.Geo` types is `text/plain`. + +Responses for type `Edm.String` MAY use the `charset` format parameter to specify the +character set used for representing the string value; omission of the `charset` parameter implies the default character set `US-ASCII`. + +Responses for the other primitive types follow the rules `booleanValue`, `byteValue`, `dateValue`, `dateTimeOffsetValue`, `decimalValue`, `doubleValue`, `durationValue`, `enumValue`, `guidValue`, `int16Value`, `int32Value`, `int64Value`, `sbyteValue`, `singleValue`, and `timeOfDayValue` in -[OData-ABNF](#ODataABNF). +[OData-ABNF](#ODataABNF); they MUST NOT use the `charset` parameter which implies the default character set `US-ASCII`. A raw value request for a property or operation result of type `Edm.Stream` returns `400 Bad Request`. @@ -3707,8 +3711,10 @@ On success, the response body MUST contain the exact count of items matching the request after applying any [`$filter`](#SystemQueryOptionfilter) or [`$search`](#SystemQueryOptionsearch) system query options, formatted as -a simple primitive integer value with media type `text/plain`. Clients -SHOULD NOT combine the system query options +a simple primitive integer value with media type `text/plain` without `charset` parameter, +and the response body consisting only of octets `0x30` to `0x39`. + +Clients SHOULD NOT combine the system query options [`$top`](#SystemQueryOptiontop), [`$skip`](#SystemQueryOptionskip), [`$orderby`](#SystemQueryOptionorderby), diff --git a/odata-protocol/1 Introduction.md b/odata-protocol/1 Introduction.md index 8127446e..2665b3e6 100644 --- a/odata-protocol/1 Introduction.md +++ b/odata-protocol/1 Introduction.md @@ -30,7 +30,8 @@ Section | Feature / Change | Issue [Section ##CollectionofEntities]| Context URLs use parentheses-style keys without percent-encoding| [368](https://github.com/oasis-tcs/odata-specs/issues/368) -[Section ##RequestingtheNumberofItemsinaCollection]| Only digits in a response to `/$count` | [325](https://github.com/oasis-tcs/odata-specs/issues/325) +[Section ##RequestingaRawValueusingvalue]| Use of `charset` parameter in responses to `/$value` | [325](https://github.com/oasis-tcs/odata-specs/issues/325) +[Section ##RequestingtheNumberofItemsinaCollection]| Only digits in a response to `/$count` | [325](https://github.com/oasis-tcs/odata-specs/issues/325) [Section ##DataModification]| Response code `204 No Content` after successful data modification if requested response could not be constructed| [443](https://github.com/oasis-tcs/odata-specs/issues/443) diff --git a/odata-protocol/11 Data Service Requests.md b/odata-protocol/11 Data Service Requests.md index 5ba42478..3b6cdafb 100644 --- a/odata-protocol/11 Data Service Requests.md +++ b/odata-protocol/11 Data Service Requests.md @@ -255,7 +255,7 @@ annotation (see [OData-VocCore](#ODataVocCore)) if this annotation is present. If not annotated, the format cannot be predicted by the client. -The default format for `Edm.Geo` types is `text/plain` using the WKT +The default format for `Edm.Geo` types is `text/plain` without `charset` parameter, using the WKT (well-known text) format, see rules `fullCollectionLiteral`, `fullLineStringLiteral`, `fullMultiPointLiteral`, `fullMultiLineStringLiteral`, `fullMultiPolygonLiteral`, @@ -263,14 +263,16 @@ The default format for `Edm.Geo` types is `text/plain` using the WKT [OData-ABNF](#ODataABNF). The default format for single primitive values except `Edm.Binary` and -the `Edm.Geo` types is `text/plain`. Responses of type -`Edm.String` can use the `charset` format parameter to specify the -character set used for representing the string value. Responses for the -other primitive types follow the rules `booleanValue`, `byteValue`, +the `Edm.Geo` types is `text/plain`. + +Responses for type `Edm.String` MAY use the `charset` format parameter to specify the +character set used for representing the string value; omission of the `charset` parameter implies the default character set `US-ASCII`. + +Responses for the other primitive types follow the rules `booleanValue`, `byteValue`, `dateValue`, `dateTimeOffsetValue`, `decimalValue`, `doubleValue`, `durationValue`, `enumValue`, `guidValue`, `int16Value`, `int32Value`, `int64Value`, `sbyteValue`, `singleValue`, and `timeOfDayValue` in -[OData-ABNF](#ODataABNF). +[OData-ABNF](#ODataABNF); they MUST NOT use the `charset` parameter which implies the default character set `US-ASCII`. A raw value request for a property or operation result of type `Edm.Stream` returns `400 Bad Request`. From c30abc4771ef8fbe38f7c4d4cfc0d8284054fa2d Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Thu, 24 Oct 2024 12:47:58 +0200 Subject: [PATCH 3/7] Reference RFCC2046 regarding default for charset --- docs/odata-protocol/odata-protocol.html | 2 +- docs/odata-protocol/odata-protocol.md | 3 ++- odata-protocol/11 Data Service Requests.md | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/odata-protocol/odata-protocol.html b/docs/odata-protocol/odata-protocol.html index 99043af2..27bdcdbf 100644 --- a/docs/odata-protocol/odata-protocol.html +++ b/docs/odata-protocol/odata-protocol.html @@ -1756,7 +1756,7 @@

OData-ABNF.

The default format for single primitive values except Edm.Binary and the Edm.Geo types is text/plain.

Responses for type Edm.String MAY use the charset format parameter to specify the character set used for representing the string value; omission of the charset parameter implies the default character set US-ASCII.

-

Responses for the other primitive types follow the rules booleanValue, byteValue, dateValue, dateTimeOffsetValue, decimalValue, doubleValue, durationValue, enumValue, guidValue, int16Value, int32Value, int64Value, sbyteValue, singleValue, and timeOfDayValue in OData-ABNF; they MUST NOT use the charset parameter which implies the default character set US-ASCII.

+

Responses for the other primitive types follow the rules booleanValue, byteValue, dateValue, dateTimeOffsetValue, decimalValue, doubleValue, durationValue, enumValue, guidValue, int16Value, int32Value, int64Value, sbyteValue, singleValue, and timeOfDayValue in OData-ABNF; they MUST NOT use the charset parameter which implies the default character set US-ASCII, see RFC2046, section 4.1.2.

A raw value request for a property or operation result of type Edm.Stream returns 400 Bad Request.

A raw value request for a property or operation result that is null results in a 204 No Content response.

If the property or operation result is not available, for example due to permissions, the service responds with 404 Not Found.

diff --git a/docs/odata-protocol/odata-protocol.md b/docs/odata-protocol/odata-protocol.md index 7b63345a..811a069b 100644 --- a/docs/odata-protocol/odata-protocol.md +++ b/docs/odata-protocol/odata-protocol.md @@ -2836,7 +2836,8 @@ Responses for the other primitive types follow the rules `booleanValue`, `byteVa `dateValue`, `dateTimeOffsetValue`, `decimalValue`, `doubleValue`, `durationValue`, `enumValue`, `guidValue`, `int16Value`, `int32Value`, `int64Value`, `sbyteValue`, `singleValue`, and `timeOfDayValue` in -[OData-ABNF](#ODataABNF); they MUST NOT use the `charset` parameter which implies the default character set `US-ASCII`. +[OData-ABNF](#ODataABNF); they MUST NOT use the `charset` parameter which implies the default character set `US-ASCII`, +see [RFC2046](#rfc2046), [section 4.1.2](https://www.rfc-editor.org/rfc/rfc2046.html#section-4.1.2). A raw value request for a property or operation result of type `Edm.Stream` returns `400 Bad Request`. diff --git a/odata-protocol/11 Data Service Requests.md b/odata-protocol/11 Data Service Requests.md index 3b6cdafb..7a8468c9 100644 --- a/odata-protocol/11 Data Service Requests.md +++ b/odata-protocol/11 Data Service Requests.md @@ -272,7 +272,8 @@ Responses for the other primitive types follow the rules `booleanValue`, `byteVa `dateValue`, `dateTimeOffsetValue`, `decimalValue`, `doubleValue`, `durationValue`, `enumValue`, `guidValue`, `int16Value`, `int32Value`, `int64Value`, `sbyteValue`, `singleValue`, and `timeOfDayValue` in -[OData-ABNF](#ODataABNF); they MUST NOT use the `charset` parameter which implies the default character set `US-ASCII`. +[OData-ABNF](#ODataABNF); they MUST NOT use the `charset` parameter which implies the default character set `US-ASCII`, +see [RFC2046](#rfc2046), [section 4.1.2](https://www.rfc-editor.org/rfc/rfc2046.html#section-4.1.2). A raw value request for a property or operation result of type `Edm.Stream` returns `400 Bad Request`. From f2b27c9e405fa28e638e1b71a1d32aea7fa28c7b Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Thu, 24 Oct 2024 12:56:29 +0200 Subject: [PATCH 4/7] Reference ABNF for count representation --- docs/odata-protocol/odata-protocol.html | 4 ++-- docs/odata-protocol/odata-protocol.md | 4 ++-- odata-protocol/11 Data Service Requests.md | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/odata-protocol/odata-protocol.html b/docs/odata-protocol/odata-protocol.html index 27bdcdbf..75548bb4 100644 --- a/docs/odata-protocol/odata-protocol.html +++ b/docs/odata-protocol/odata-protocol.html @@ -1756,7 +1756,7 @@

OData-ABNF.

The default format for single primitive values except Edm.Binary and the Edm.Geo types is text/plain.

Responses for type Edm.String MAY use the charset format parameter to specify the character set used for representing the string value; omission of the charset parameter implies the default character set US-ASCII.

-

Responses for the other primitive types follow the rules booleanValue, byteValue, dateValue, dateTimeOffsetValue, decimalValue, doubleValue, durationValue, enumValue, guidValue, int16Value, int32Value, int64Value, sbyteValue, singleValue, and timeOfDayValue in OData-ABNF; they MUST NOT use the charset parameter which implies the default character set US-ASCII, see RFC2046, section 4.1.2.

+

Responses for the other primitive types follow the rules booleanValue, byteValue, dateValue, dateTimeOffsetValue, decimalValue, doubleValue, durationValue, enumValue, guidValue, int16Value, int32Value, int64Value, sbyteValue, singleValue, and timeOfDayValue in OData-ABNF; they MUST NOT use the charset parameter, this implies the default character set US-ASCII, see RFC2046, section 4.1.2.

A raw value request for a property or operation result of type Edm.Stream returns 400 Bad Request.

A raw value request for a property or operation result that is null results in a 204 No Content response.

If the property or operation result is not available, for example due to permissions, the service responds with 404 Not Found.

@@ -2175,7 +2175,7 @@

11.2.10 Requesting the Number of Items in a Collection

To request only the number of items of a collection of entities or items of a collection-valued property, the client issues a GET request with /$count appended to the resource path of the collection.

-

On success, the response body MUST contain the exact count of items matching the request after applying any $filter or $search system query options, formatted as a simple primitive integer value with media type text/plain without charset parameter, and the response body consisting only of octets 0x30 to 0x39.

+

On success, the response body MUST contain the exact count of items matching the request after applying any $filter or $search system query options, formatted as a simple primitive integer value with media type text/plain without charset parameter, and the response body following rule int64value without the sign, see OData-ABNF.

Clients SHOULD NOT combine the system query options $top, $skip, $orderby, $expand, and $format with the path suffix /$count. The result of such a request is undefined.

Example 69: return the number of products in the Products entity set

diff --git a/docs/odata-protocol/odata-protocol.md b/docs/odata-protocol/odata-protocol.md index 811a069b..e9d913ab 100644 --- a/docs/odata-protocol/odata-protocol.md +++ b/docs/odata-protocol/odata-protocol.md @@ -2836,7 +2836,7 @@ Responses for the other primitive types follow the rules `booleanValue`, `byteVa `dateValue`, `dateTimeOffsetValue`, `decimalValue`, `doubleValue`, `durationValue`, `enumValue`, `guidValue`, `int16Value`, `int32Value`, `int64Value`, `sbyteValue`, `singleValue`, and `timeOfDayValue` in -[OData-ABNF](#ODataABNF); they MUST NOT use the `charset` parameter which implies the default character set `US-ASCII`, +[OData-ABNF](#ODataABNF); they MUST NOT use the `charset` parameter, this implies the default character set `US-ASCII`, see [RFC2046](#rfc2046), [section 4.1.2](https://www.rfc-editor.org/rfc/rfc2046.html#section-4.1.2). A raw value request for a property or operation result of type `Edm.Stream` @@ -3713,7 +3713,7 @@ matching the request after applying any [`$filter`](#SystemQueryOptionfilter) or [`$search`](#SystemQueryOptionsearch) system query options, formatted as a simple primitive integer value with media type `text/plain` without `charset` parameter, -and the response body consisting only of octets `0x30` to `0x39`. +and the response body following rule `int64value` without the sign, see [OData-ABNF](#ODataABNF). Clients SHOULD NOT combine the system query options [`$top`](#SystemQueryOptiontop), diff --git a/odata-protocol/11 Data Service Requests.md b/odata-protocol/11 Data Service Requests.md index 7a8468c9..e6fe5e0f 100644 --- a/odata-protocol/11 Data Service Requests.md +++ b/odata-protocol/11 Data Service Requests.md @@ -272,7 +272,7 @@ Responses for the other primitive types follow the rules `booleanValue`, `byteVa `dateValue`, `dateTimeOffsetValue`, `decimalValue`, `doubleValue`, `durationValue`, `enumValue`, `guidValue`, `int16Value`, `int32Value`, `int64Value`, `sbyteValue`, `singleValue`, and `timeOfDayValue` in -[OData-ABNF](#ODataABNF); they MUST NOT use the `charset` parameter which implies the default character set `US-ASCII`, +[OData-ABNF](#ODataABNF); they MUST NOT use the `charset` parameter, this implies the default character set `US-ASCII`, see [RFC2046](#rfc2046), [section 4.1.2](https://www.rfc-editor.org/rfc/rfc2046.html#section-4.1.2). A raw value request for a property or operation result of type `Edm.Stream` @@ -1149,7 +1149,7 @@ matching the request after applying any [`$filter`](#SystemQueryOptionfilter) or [`$search`](#SystemQueryOptionsearch) system query options, formatted as a simple primitive integer value with media type `text/plain` without `charset` parameter, -and the response body consisting only of octets `0x30` to `0x39`. +and the response body following rule `int64value` without the sign, see [OData-ABNF](#ODataABNF). Clients SHOULD NOT combine the system query options [`$top`](#SystemQueryOptiontop), From eea6c8f04b5a6b22278d02c57ccda43f2ba8e6d1 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Thu, 24 Oct 2024 13:42:56 +0200 Subject: [PATCH 5/7] Heiko's suggestion --- docs/odata-protocol/odata-protocol.html | 2 +- docs/odata-protocol/odata-protocol.md | 2 +- odata-protocol/11 Data Service Requests.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/odata-protocol/odata-protocol.html b/docs/odata-protocol/odata-protocol.html index 75548bb4..434380b0 100644 --- a/docs/odata-protocol/odata-protocol.html +++ b/docs/odata-protocol/odata-protocol.html @@ -2175,7 +2175,7 @@

11.2.10 Requesting the Number of Items in a Collection

To request only the number of items of a collection of entities or items of a collection-valued property, the client issues a GET request with /$count appended to the resource path of the collection.

-

On success, the response body MUST contain the exact count of items matching the request after applying any $filter or $search system query options, formatted as a simple primitive integer value with media type text/plain without charset parameter, and the response body following rule int64value without the sign, see OData-ABNF.

+

On success, the response body MUST contain the exact count of items matching the request after applying any $filter or $search system query options, formatted as a simple primitive integer value with media type text/plain without charset parameter, and the response body following rule int64Value without the sign, see OData-ABNF.

Clients SHOULD NOT combine the system query options $top, $skip, $orderby, $expand, and $format with the path suffix /$count. The result of such a request is undefined.

Example 69: return the number of products in the Products entity set

diff --git a/docs/odata-protocol/odata-protocol.md b/docs/odata-protocol/odata-protocol.md index e9d913ab..b8b4728a 100644 --- a/docs/odata-protocol/odata-protocol.md +++ b/docs/odata-protocol/odata-protocol.md @@ -3713,7 +3713,7 @@ matching the request after applying any [`$filter`](#SystemQueryOptionfilter) or [`$search`](#SystemQueryOptionsearch) system query options, formatted as a simple primitive integer value with media type `text/plain` without `charset` parameter, -and the response body following rule `int64value` without the sign, see [OData-ABNF](#ODataABNF). +and the response body following rule `int64Value` without the sign, see [OData-ABNF](#ODataABNF). Clients SHOULD NOT combine the system query options [`$top`](#SystemQueryOptiontop), diff --git a/odata-protocol/11 Data Service Requests.md b/odata-protocol/11 Data Service Requests.md index e6fe5e0f..c175a04b 100644 --- a/odata-protocol/11 Data Service Requests.md +++ b/odata-protocol/11 Data Service Requests.md @@ -1149,7 +1149,7 @@ matching the request after applying any [`$filter`](#SystemQueryOptionfilter) or [`$search`](#SystemQueryOptionsearch) system query options, formatted as a simple primitive integer value with media type `text/plain` without `charset` parameter, -and the response body following rule `int64value` without the sign, see [OData-ABNF](#ODataABNF). +and the response body following rule `int64Value` without the sign, see [OData-ABNF](#ODataABNF). Clients SHOULD NOT combine the system query options [`$top`](#SystemQueryOptiontop), From 8258cc968ab3c999634d5c3e13634e69ea81c4c9 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Thu, 24 Oct 2024 13:50:55 +0200 Subject: [PATCH 6/7] Heiko's proposal --- docs/odata-protocol/odata-protocol.html | 2 +- docs/odata-protocol/odata-protocol.md | 2 +- odata-protocol/11 Data Service Requests.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/odata-protocol/odata-protocol.html b/docs/odata-protocol/odata-protocol.html index 434380b0..61c8e885 100644 --- a/docs/odata-protocol/odata-protocol.html +++ b/docs/odata-protocol/odata-protocol.html @@ -2175,7 +2175,7 @@

11.2.10 Requesting the Number of Items in a Collection

To request only the number of items of a collection of entities or items of a collection-valued property, the client issues a GET request with /$count appended to the resource path of the collection.

-

On success, the response body MUST contain the exact count of items matching the request after applying any $filter or $search system query options, formatted as a simple primitive integer value with media type text/plain without charset parameter, and the response body following rule int64Value without the sign, see OData-ABNF.

+

On success, the response body MUST contain the exact count of items matching the request after applying any $filter or $search system query options, formatted as a simple primitive integer value with media type text/plain without charset parameter, and the response body following rule 1*DIGIT.

Clients SHOULD NOT combine the system query options $top, $skip, $orderby, $expand, and $format with the path suffix /$count. The result of such a request is undefined.

Example 69: return the number of products in the Products entity set

diff --git a/docs/odata-protocol/odata-protocol.md b/docs/odata-protocol/odata-protocol.md index b8b4728a..b609c89f 100644 --- a/docs/odata-protocol/odata-protocol.md +++ b/docs/odata-protocol/odata-protocol.md @@ -3713,7 +3713,7 @@ matching the request after applying any [`$filter`](#SystemQueryOptionfilter) or [`$search`](#SystemQueryOptionsearch) system query options, formatted as a simple primitive integer value with media type `text/plain` without `charset` parameter, -and the response body following rule `int64Value` without the sign, see [OData-ABNF](#ODataABNF). +and the response body following rule `1*DIGIT`. Clients SHOULD NOT combine the system query options [`$top`](#SystemQueryOptiontop), diff --git a/odata-protocol/11 Data Service Requests.md b/odata-protocol/11 Data Service Requests.md index c175a04b..5ba183c2 100644 --- a/odata-protocol/11 Data Service Requests.md +++ b/odata-protocol/11 Data Service Requests.md @@ -1149,7 +1149,7 @@ matching the request after applying any [`$filter`](#SystemQueryOptionfilter) or [`$search`](#SystemQueryOptionsearch) system query options, formatted as a simple primitive integer value with media type `text/plain` without `charset` parameter, -and the response body following rule `int64Value` without the sign, see [OData-ABNF](#ODataABNF). +and the response body following rule `1*DIGIT`. Clients SHOULD NOT combine the system query options [`$top`](#SystemQueryOptiontop), From f0e4a7e5189555743b96c1ddbff6c6226f6b7af5 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Thu, 24 Oct 2024 17:40:44 +0200 Subject: [PATCH 7/7] Heiko's suggestion --- docs/odata-protocol/odata-protocol.html | 2 +- docs/odata-protocol/odata-protocol.md | 2 +- odata-protocol/11 Data Service Requests.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/odata-protocol/odata-protocol.html b/docs/odata-protocol/odata-protocol.html index 61c8e885..934a5b5d 100644 --- a/docs/odata-protocol/odata-protocol.html +++ b/docs/odata-protocol/odata-protocol.html @@ -2175,7 +2175,7 @@

11.2.10 Requesting the Number of Items in a Collection

To request only the number of items of a collection of entities or items of a collection-valued property, the client issues a GET request with /$count appended to the resource path of the collection.

-

On success, the response body MUST contain the exact count of items matching the request after applying any $filter or $search system query options, formatted as a simple primitive integer value with media type text/plain without charset parameter, and the response body following rule 1*DIGIT.

+

On success, the response body MUST contain the exact count of items matching the request after applying any $filter or $search system query options, formatted as a simple primitive integer value with media type text/plain without charset parameter, and the response body following rule 1*DIGIT, see OData-ABNF.

Clients SHOULD NOT combine the system query options $top, $skip, $orderby, $expand, and $format with the path suffix /$count. The result of such a request is undefined.

Example 69: return the number of products in the Products entity set

diff --git a/docs/odata-protocol/odata-protocol.md b/docs/odata-protocol/odata-protocol.md index b609c89f..250bbce7 100644 --- a/docs/odata-protocol/odata-protocol.md +++ b/docs/odata-protocol/odata-protocol.md @@ -3713,7 +3713,7 @@ matching the request after applying any [`$filter`](#SystemQueryOptionfilter) or [`$search`](#SystemQueryOptionsearch) system query options, formatted as a simple primitive integer value with media type `text/plain` without `charset` parameter, -and the response body following rule `1*DIGIT`. +and the response body following rule `1*DIGIT`, see [OData-ABNF](#ODataABNF). Clients SHOULD NOT combine the system query options [`$top`](#SystemQueryOptiontop), diff --git a/odata-protocol/11 Data Service Requests.md b/odata-protocol/11 Data Service Requests.md index 5ba183c2..86f3b193 100644 --- a/odata-protocol/11 Data Service Requests.md +++ b/odata-protocol/11 Data Service Requests.md @@ -1149,7 +1149,7 @@ matching the request after applying any [`$filter`](#SystemQueryOptionfilter) or [`$search`](#SystemQueryOptionsearch) system query options, formatted as a simple primitive integer value with media type `text/plain` without `charset` parameter, -and the response body following rule `1*DIGIT`. +and the response body following rule `1*DIGIT`, see [OData-ABNF](#ODataABNF). Clients SHOULD NOT combine the system query options [`$top`](#SystemQueryOptiontop),