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`.