From f2b27c9e405fa28e638e1b71a1d32aea7fa28c7b Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Thu, 24 Oct 2024 12:56:29 +0200 Subject: [PATCH] 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),