diff --git a/docs/odata-protocol/odata-protocol.html b/docs/odata-protocol/odata-protocol.html index 24440406..5641696e 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, section 4.7 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, 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.

@@ -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 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

GET http://host/service/Products/$count
diff --git a/docs/odata-protocol/odata-protocol.md b/docs/odata-protocol/odata-protocol.md index acc0233c..eaedd379 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,17 @@ 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, 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` returns `400 Bad Request`. @@ -3707,8 +3712,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 following rule `1*DIGIT`, see [OData-ABNF](#ODataABNF). + +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 b43b3c1c..27f64c1e 100644 --- a/odata-protocol/1 Introduction.md +++ b/odata-protocol/1 Introduction.md @@ -30,6 +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 ##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 229b5547..c48f21a4 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,17 @@ 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, 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` returns `400 Bad Request`. @@ -1145,8 +1148,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 following rule `1*DIGIT`, see [OData-ABNF](#ODataABNF). + +Clients SHOULD NOT combine the system query options [`$top`](#SystemQueryOptiontop), [`$skip`](#SystemQueryOptionskip), [`$orderby`](#SystemQueryOptionorderby),