From 616b74d61220cd5b939a3c6421cc91180b511a4e Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Wed, 13 Nov 2024 18:31:39 +0100 Subject: [PATCH] Use really simple identifiers (#2016) Fixes #375 --- docs/odata-csdl-json/odata-csdl-json.html | 9 ++++++++- docs/odata-csdl-json/odata-csdl-json.md | 8 +++++++- docs/odata-csdl-xml/odata-csdl-xml.html | 9 ++++++++- docs/odata-csdl-xml/odata-csdl-xml.md | 8 +++++++- odata-csdl/1 Introduction.md | 1 + odata-csdl/15 Identifier and Path Values.md | 7 ++++++- 6 files changed, 37 insertions(+), 5 deletions(-) diff --git a/docs/odata-csdl-json/odata-csdl-json.html b/docs/odata-csdl-json/odata-csdl-json.html index e4dfd831..718ece73 100644 --- a/docs/odata-csdl-json/odata-csdl-json.html +++ b/docs/odata-csdl-json/odata-csdl-json.html @@ -489,6 +489,11 @@

326 +Section 15.2 +Prefer identifiers consisting only of latin letters, the underscore, and decimal numbers +375 + + Section 17 Additional conformance clauses for version 4.02 @@ -3888,6 +3893,7 @@

The remaining characters MUST be the underscore character (U+005F) or any character in the Unicode category “Letter (L)”, “Letter number (Nl)”, “Decimal number (Nd)”, “Non-spacing mark (Mn)”, “Combining spacing mark (Mc)”, “Connector punctuation (Pc)”, and “Other, format (Cf)”.

Non-normatively speaking it starts with a letter or underscore, followed by at most 127 letters, underscores or digits.

+

For maximum interoperability services SHOULD use simple identifiers that additionally only consist of characters from the Basic Latin code block and match the pattern ^[_A-Za-z][_A-Za-z0-9]*$.

15.3 Qualified Name

@@ -4225,9 +4231,10 @@

17 Conformance
  • SHOULD NOT have identifiers within a uniqueness scope (e.g. a schema, a structural type, or an entity container) that differ only by case
  • -

    In addition, OData 4.01 services:

    +

    In addition, OData 4.02 or greater services:

    1. SHOULD NOT include constant Geo or Stream values in annotations
    2. +
    3. SHOULD use simple identifiers matching the pattern ^[_A-Za-z][_A-Za-z0-9]*$

    Conforming clients MUST be prepared to consume a model that uses any or all constructs defined in this specification, including custom annotations, and MUST ignore constructs not defined in this version of the specification.

    diff --git a/docs/odata-csdl-json/odata-csdl-json.md b/docs/odata-csdl-json/odata-csdl-json.md index 6acf0845..f8f960a6 100644 --- a/docs/odata-csdl-json/odata-csdl-json.md +++ b/docs/odata-csdl-json/odata-csdl-json.md @@ -273,6 +273,7 @@ Section | Feature / Change | Issue [Section 14.3.14](#StreamValues) | Constant Stream values in annotations | [654](https://github.com/oasis-tcs/odata-specs/issues/654) [Section 14.4.1.2](#PathEvaluation)| New path evaluation rules for annotations targeting annotations and external targeting via container| [575](https://github.com/oasis-tcs/odata-specs/issues/575) [Section 14.4.7](#IfThenElse)| Nested `If` without else part in collections| [326](https://github.com/oasis-tcs/odata-specs/issues/326) +[Section 15.2](#SimpleIdentifier) | Prefer identifiers consisting only of latin letters, the underscore, and decimal numbers | [375](https://github.com/oasis-tcs/odata-specs/issues/375) [Section 17](#Conformance) | Additional conformance clauses for version 4.02 | ## 1.2 Glossary @@ -5695,6 +5696,10 @@ restrictions: Non-normatively speaking it starts with a letter or underscore, followed by at most 127 letters, underscores or digits. +For maximum interoperability services SHOULD use simple identifiers +that additionally only consist of characters from the Basic Latin code block +and match the pattern `^[_A-Za-z][_A-Za-z0-9]*$`. + ## 15.3 Qualified Name For model elements that are direct children of a schema: the namespace @@ -6071,9 +6076,10 @@ In addition, OData 4.01 or greater services: schema, a structural type, or an entity container) that differ only by case -In addition, OData 4.01 services: +In addition, OData 4.02 or greater services: 15. SHOULD NOT include constant [Geo](#GeoValues) or [Stream values](#StreamValues) in annotations +16. SHOULD use [simple identifiers](#SimpleIdentifier) matching the pattern `^[_A-Za-z][_A-Za-z0-9]*$` Conforming clients MUST be prepared to consume a model that uses any or all constructs defined in this specification, including custom diff --git a/docs/odata-csdl-xml/odata-csdl-xml.html b/docs/odata-csdl-xml/odata-csdl-xml.html index 3c57b6db..8eb5d574 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.html +++ b/docs/odata-csdl-xml/odata-csdl-xml.html @@ -493,6 +493,11 @@

    326 +Section 15.2 +Prefer identifiers consisting only of latin letters, the underscore, and decimal numbers +375 + + Section 17 Additional conformance clauses for version 4.02 @@ -3642,6 +3647,7 @@

    The remaining characters MUST be the underscore character (U+005F) or any character in the Unicode category “Letter (L)”, “Letter number (Nl)”, “Decimal number (Nd)”, “Non-spacing mark (Mn)”, “Combining spacing mark (Mc)”, “Connector punctuation (Pc)”, and “Other, format (Cf)”.

    Non-normatively speaking it starts with a letter or underscore, followed by at most 127 letters, underscores or digits.

    +

    For maximum interoperability services SHOULD use simple identifiers that additionally only consist of characters from the Basic Latin code block and match the pattern ^[_A-Za-z][_A-Za-z0-9]*$.

    15.3 Qualified Name

    @@ -3861,9 +3867,10 @@

    17 Conformance
  • SHOULD NOT have identifiers within a uniqueness scope (e.g. a schema, a structural type, or an entity container) that differ only by case
  • -

    In addition, OData 4.01 services:

    +

    In addition, OData 4.02 or greater services:

    1. SHOULD NOT include constant Geo or Stream values in annotations
    2. +
    3. SHOULD use simple identifiers matching the pattern ^[_A-Za-z][_A-Za-z0-9]*$

    Conforming clients MUST be prepared to consume a model that uses any or all constructs defined in this specification, including custom annotations, and MUST ignore constructs not defined in this version of the specification.

    diff --git a/docs/odata-csdl-xml/odata-csdl-xml.md b/docs/odata-csdl-xml/odata-csdl-xml.md index a8a554ec..9b762167 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.md +++ b/docs/odata-csdl-xml/odata-csdl-xml.md @@ -274,6 +274,7 @@ Section | Feature / Change | Issue [Section 14.3.14](#StreamValues) | Constant Stream values in annotations | [654](https://github.com/oasis-tcs/odata-specs/issues/654) [Section 14.4.1.2](#PathEvaluation)| New path evaluation rules for annotations targeting annotations and external targeting via container| [575](https://github.com/oasis-tcs/odata-specs/issues/575) [Section 14.4.7](#IfThenElse)| Nested `If` without else part in collections| [326](https://github.com/oasis-tcs/odata-specs/issues/326) +[Section 15.2](#SimpleIdentifier) | Prefer identifiers consisting only of latin letters, the underscore, and decimal numbers | [375](https://github.com/oasis-tcs/odata-specs/issues/375) [Section 17](#Conformance) | Additional conformance clauses for version 4.02 | ## 1.2 Glossary @@ -5495,6 +5496,10 @@ restrictions: Non-normatively speaking it starts with a letter or underscore, followed by at most 127 letters, underscores or digits. +For maximum interoperability services SHOULD use simple identifiers +that additionally only consist of characters from the Basic Latin code block +and match the pattern `^[_A-Za-z][_A-Za-z0-9]*$`. + ## 15.3 Qualified Name For model elements that are direct children of a schema: the namespace @@ -5753,9 +5758,10 @@ In addition, OData 4.01 or greater services: schema, a structural type, or an entity container) that differ only by case -In addition, OData 4.01 services: +In addition, OData 4.02 or greater services: 15. SHOULD NOT include constant [Geo](#GeoValues) or [Stream values](#StreamValues) in annotations +16. SHOULD use [simple identifiers](#SimpleIdentifier) matching the pattern `^[_A-Za-z][_A-Za-z0-9]*$` Conforming clients MUST be prepared to consume a model that uses any or all constructs defined in this specification, including custom diff --git a/odata-csdl/1 Introduction.md b/odata-csdl/1 Introduction.md index 16330f22..1fe28e19 100644 --- a/odata-csdl/1 Introduction.md +++ b/odata-csdl/1 Introduction.md @@ -56,6 +56,7 @@ New path evaluation rules for annotations targeting annotations and external tar [Section ##IfThenElse]| Nested `If` without else part in collections| [326](https://github.com/oasis-tcs/odata-specs/issues/326) +[Section ##SimpleIdentifier] | Prefer identifiers consisting only of latin letters, the underscore, and decimal numbers | [375](https://github.com/oasis-tcs/odata-specs/issues/375) [Section ##Conformance] | Additional conformance clauses for version 4.02 | ## ##subsec Glossary diff --git a/odata-csdl/15 Identifier and Path Values.md b/odata-csdl/15 Identifier and Path Values.md index 2ef481f0..3ed1a3c9 100644 --- a/odata-csdl/15 Identifier and Path Values.md +++ b/odata-csdl/15 Identifier and Path Values.md @@ -28,6 +28,10 @@ restrictions: Non-normatively speaking it starts with a letter or underscore, followed by at most 127 letters, underscores or digits. +For maximum interoperability services SHOULD use simple identifiers +that additionally only consist of characters from the Basic Latin code block +and match the pattern `^[_A-Za-z][_A-Za-z0-9]*$`. + ## ##subsec Qualified Name For model elements that are direct children of a schema: the namespace @@ -574,9 +578,10 @@ In addition, OData 4.01 or greater services: schema, a structural type, or an entity container) that differ only by case -In addition, OData 4.01 services: +In addition, OData 4.02 or greater services: 15. SHOULD NOT include constant [Geo](#GeoValues) or [Stream values](#StreamValues) in annotations +16. SHOULD use [simple identifiers](#SimpleIdentifier) matching the pattern `^[_A-Za-z][_A-Za-z0-9]*$` Conforming clients MUST be prepared to consume a model that uses any or all constructs defined in this specification, including custom