From 365adc80fa83ed25ffb9ca68617da1e82afde406 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Heiko=20Thei=C3=9Fen?= Date: Fri, 27 Oct 2023 10:12:14 +0200 Subject: [PATCH 1/4] Corrected main module in package.json (#202) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 33ce27150..3b3813213 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "odata-specs", "version": "1.0.0", "description": "", - "main": "number.js", + "main": "lib/server.js", "scripts": { "build": "node lib/build.js", "pdf": "node lib/build-pdf.js", From a66e7ac173fe5e57da4e2440d12891e19cef41e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Heiko=20Thei=C3=9Fen?= Date: Tue, 31 Oct 2023 13:57:39 +0100 Subject: [PATCH 2/4] Typo: Principal property (#207) --- docs/odata-protocol/odata-protocol.html | 2 +- docs/odata-protocol/odata-protocol.md | 2 +- odata-protocol/11.4 Data Modification.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 0a5a90a4f..a2ec11f21 100644 --- a/docs/odata-protocol/odata-protocol.html +++ b/docs/odata-protocol/odata-protocol.html @@ -1798,7 +1798,7 @@

1

Services MAY additionally support PUT but should be aware of the potential for data-loss in round-tripping properties that the client may not know about in advance, such as open or added properties, or properties not specified in metadata. Services that support PUT MUST replace all values of structural properties with those specified in the request body. Missing non-key, updatable structural properties not defined as dependent properties within a referential constraint MUST be set to their default values. Omitting a non-nullable property with no service-generated or default value from a PUT request results in a 400 Bad Request error. Missing dynamic structural properties MUST be removed or set to null.

For requests with an OData-Version header with a value of 4.01 or greater, the media stream of a media entity can be updated by specifying the base64url-encoded representation of the media stream as a virtual property $value.

Updating a dependent property that is tied to a key property of the principal entity through a referential constraint updates the relationship to point to the entity with the specified key value. If there is no such entity, the update fails.

-

Updating a principle property that is tied to a dependent entity through a referential constraint on the dependent entity updates the dependent property.

+

Updating a principal property that is tied to a dependent entity through a referential constraint on the dependent entity updates the dependent property.

Key and other properties marked as read-only in metadata (including computed properties), as well as dependent properties that are not tied to key properties of the principal entity, can be omitted from the request. If the request contains a value for one of these properties, the service MUST ignore that value when applying the update. Services MUST return an error if an insert or update contains a new value for a property marked as updatable that cannot currently be changed by the user (i.e., given the state of the object or permissions of the user). The service MAY return success in this case if the specified value matches the value of the property. Clients SHOULD use PATCH and specify only those properties intended to be changed.

Entity id and entity type cannot be changed when updating an entity. However, format-specific rules might in some cases require providing entity id and entity type values in the payload when applying the update.

For requests with an OData-Version header with a value of 4.01 or greater, if the entity representation in the request body includes an ETag value, the update MUST NOT be performed and SHOULD return 412 Precondition Failed if the supplied ETag value is not * and does not match the current ETag value for the entity. ETag values in request bodies MUST be ignored for requests containing an OData-Version header with a value of 4.0.

diff --git a/docs/odata-protocol/odata-protocol.md b/docs/odata-protocol/odata-protocol.md index bc321407a..99d2eea28 100644 --- a/docs/odata-protocol/odata-protocol.md +++ b/docs/odata-protocol/odata-protocol.md @@ -4291,7 +4291,7 @@ principal entity through a referential constraint updates the relationship to point to the entity with the specified key value. If there is no such entity, the update fails. -Updating a principle property that is tied to a dependent entity through +Updating a principal property that is tied to a dependent entity through a referential constraint on the dependent entity updates the dependent property. diff --git a/odata-protocol/11.4 Data Modification.md b/odata-protocol/11.4 Data Modification.md index a54ec5def..3af494884 100644 --- a/odata-protocol/11.4 Data Modification.md +++ b/odata-protocol/11.4 Data Modification.md @@ -344,7 +344,7 @@ principal entity through a referential constraint updates the relationship to point to the entity with the specified key value. If there is no such entity, the update fails. -Updating a principle property that is tied to a dependent entity through +Updating a principal property that is tied to a dependent entity through a referential constraint on the dependent entity updates the dependent property. From a5179ccdee48a347ee59b63d66e8ddab7331c203 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Tue, 31 Oct 2023 14:22:26 +0100 Subject: [PATCH 3/4] typo: principle -> principal (#208) --- docs/odata-csdl-json/odata-csdl-json.html | 4 ++-- docs/odata-csdl-json/odata-csdl-json.md | 4 ++-- docs/odata-csdl-xml/odata-csdl-xml.html | 4 ++-- docs/odata-csdl-xml/odata-csdl-xml.md | 4 ++-- odata-csdl/7 Structural Property.md | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/odata-csdl-json/odata-csdl-json.html b/docs/odata-csdl-json/odata-csdl-json.html index d73e47da3..d271b7b61 100644 --- a/docs/odata-csdl-json/odata-csdl-json.html +++ b/docs/odata-csdl-json/odata-csdl-json.html @@ -1339,8 +1339,8 @@

$ContainsTarget

8.5 Referential Constraint

A single-valued navigation property MAY define one or more referential constraints. A referential constraint asserts that the dependent property (the property defined on the structured type declaring the navigation property) MUST have the same value as the principal property (the referenced property declared on the entity type that is the target of the navigation).

The type of the dependent property MUST match the type of the principal property, or both types MUST be complex types.

-

If the principle property references an entity, then the dependent property must reference the same entity.

-

If the principle property's value is a complex type instance, then the dependent property's value must be a complex type instance with the same properties, each with the same values.

+

If the principal property references an entity, then the dependent property must reference the same entity.

+

If the principal property's value is a complex type instance, then the dependent property's value must be a complex type instance with the same properties, each with the same values.

If the navigation property on which the referential constraint is defined is nullable, or the principal property is nullable, then the dependent property MUST also be nullable. If both the navigation property and the principal property are not nullable, then the dependent property MUST NOT be nullable.

$ReferentialConstraint

diff --git a/docs/odata-csdl-json/odata-csdl-json.md b/docs/odata-csdl-json/odata-csdl-json.md index c3c0540a2..f54551bbc 100644 --- a/docs/odata-csdl-json/odata-csdl-json.md +++ b/docs/odata-csdl-json/odata-csdl-json.md @@ -2097,10 +2097,10 @@ the target of the navigation). The type of the dependent property MUST match the type of the principal property, or both types MUST be complex types. -If the principle property references an entity, then the dependent +If the principal property references an entity, then the dependent property must reference the same entity. -If the principle property's value is a complex type instance, then the +If the principal property's value is a complex type instance, then the dependent property's value must be a complex type instance with the same properties, each with the same values. diff --git a/docs/odata-csdl-xml/odata-csdl-xml.html b/docs/odata-csdl-xml/odata-csdl-xml.html index 0d1b52af9..8e564e705 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.html +++ b/docs/odata-csdl-xml/odata-csdl-xml.html @@ -1234,8 +1234,8 @@

A

8.5 Referential Constraint

A single-valued navigation property MAY define one or more referential constraints. A referential constraint asserts that the dependent property (the property defined on the structured type declaring the navigation property) MUST have the same value as the principal property (the referenced property declared on the entity type that is the target of the navigation).

The type of the dependent property MUST match the type of the principal property, or both types MUST be complex types.

-

If the principle property references an entity, then the dependent property must reference the same entity.

-

If the principle property's value is a complex type instance, then the dependent property's value must be a complex type instance with the same properties, each with the same values.

+

If the principal property references an entity, then the dependent property must reference the same entity.

+

If the principal property's value is a complex type instance, then the dependent property's value must be a complex type instance with the same properties, each with the same values.

If the navigation property on which the referential constraint is defined is nullable, or the principal property is nullable, then the dependent property MUST also be nullable. If both the navigation property and the principal property are not nullable, then the dependent property MUST NOT be nullable.

Element edm:ReferentialConstraint

diff --git a/docs/odata-csdl-xml/odata-csdl-xml.md b/docs/odata-csdl-xml/odata-csdl-xml.md index 54781c677..d7d112ac9 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.md +++ b/docs/odata-csdl-xml/odata-csdl-xml.md @@ -1977,10 +1977,10 @@ the target of the navigation). The type of the dependent property MUST match the type of the principal property, or both types MUST be complex types. -If the principle property references an entity, then the dependent +If the principal property references an entity, then the dependent property must reference the same entity. -If the principle property's value is a complex type instance, then the +If the principal property's value is a complex type instance, then the dependent property's value must be a complex type instance with the same properties, each with the same values. diff --git a/odata-csdl/7 Structural Property.md b/odata-csdl/7 Structural Property.md index 6b8170bbf..0b5a24dbb 100644 --- a/odata-csdl/7 Structural Property.md +++ b/odata-csdl/7 Structural Property.md @@ -557,10 +557,10 @@ the target of the navigation). The type of the dependent property MUST match the type of the principal property, or both types MUST be complex types. -If the principle property references an entity, then the dependent +If the principal property references an entity, then the dependent property must reference the same entity. -If the principle property's value is a complex type instance, then the +If the principal property's value is a complex type instance, then the dependent property's value must be a complex type instance with the same properties, each with the same values. From e738a9835caca24a6378e891b6ca6ad41511f8fe Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Tue, 31 Oct 2023 14:30:39 +0100 Subject: [PATCH 4/4] Another mistyped principal (#210) --- docs/odata-json-format/odata-json-format.html | 2 +- docs/odata-json-format/odata-json-format.md | 2 +- odata-json-format/15 Delta Payload.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/odata-json-format/odata-json-format.html b/docs/odata-json-format/odata-json-format.html index 372c60dfe..231313fb6 100644 --- a/docs/odata-json-format/odata-json-format.html +++ b/docs/odata-json-format/odata-json-format.html @@ -1164,7 +1164,7 @@

entities.

Added entities MUST include all available selected properties and MAY include additional, unselected properties. Collection-valued properties are treated as atomic values; any collection-valued properties returned from a delta request MUST contain all current values for that collection.

Changed entities MUST include all available selected properties that have changed, and MAY include additional properties.

-

If a property of an entity is dependent upon the property of another entity within the expanded set of entities being tracked, then both the change to the dependent property as well as the change to the principle property or added/deleted link corresponding to the change to the dependent property are returned in the delta response.

+

If a property of an entity is dependent upon the property of another entity within the expanded set of entities being tracked, then both the change to the dependent property as well as the change to the principal property or added/deleted link corresponding to the change to the dependent property are returned in the delta response.

Entities that are not part of the entity set specified by the context URL MUST include the context control information to specify the entity set of the entity, regardless of the specified metadata value.

Entities include control information for selected navigation links based on metadata.

OData 4.0 payloads MUST NOT include expanded navigation properties inline; all changes MUST be represented as a flat array of added, deleted, or changed entities, along with added or deleted links.

diff --git a/docs/odata-json-format/odata-json-format.md b/docs/odata-json-format/odata-json-format.md index 539712cc3..4eb96a011 100644 --- a/docs/odata-json-format/odata-json-format.md +++ b/docs/odata-json-format/odata-json-format.md @@ -2186,7 +2186,7 @@ have changed, and MAY include additional properties. If a property of an entity is dependent upon the property of another entity within the expanded set of entities being tracked, then both the -change to the dependent property as well as the change to the principle +change to the dependent property as well as the change to the principal property or [added](#AddedLink)/[deleted link](#DeletedLink) corresponding to the change to the dependent property are returned in the delta response. diff --git a/odata-json-format/15 Delta Payload.md b/odata-json-format/15 Delta Payload.md index c30552313..46e96ce9f 100644 --- a/odata-json-format/15 Delta Payload.md +++ b/odata-json-format/15 Delta Payload.md @@ -116,7 +116,7 @@ have changed, and MAY include additional properties. If a property of an entity is dependent upon the property of another entity within the expanded set of entities being tracked, then both the -change to the dependent property as well as the change to the principle +change to the dependent property as well as the change to the principal property or [added](#AddedLink)/[deleted link](#DeletedLink) corresponding to the change to the dependent property are returned in the delta response.