Skip to content

Commit

Permalink
Use really simple identifiers (#2016)
Browse files Browse the repository at this point in the history
Fixes #375
  • Loading branch information
ralfhandl authored Nov 13, 2024
1 parent 874253e commit 616b74d
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 5 deletions.
9 changes: 8 additions & 1 deletion docs/odata-csdl-json/odata-csdl-json.html
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,11 @@ <h2 id="11-changes-from-earlier-versions"><a id="ChangesfromEarlierVersions" hre
<td><a href="https://github.com/oasis-tcs/odata-specs/issues/326">326</a></td>
</tr>
<tr class="even">
<td><a href="#SimpleIdentifier">Section 15.2</a></td>
<td>Prefer identifiers consisting only of latin letters, the underscore, and decimal numbers</td>
<td><a href="https://github.com/oasis-tcs/odata-specs/issues/375">375</a></td>
</tr>
<tr class="odd">
<td><a href="#Conformance">Section 17</a></td>
<td>Additional conformance clauses for version 4.02</td>
<td></td>
Expand Down Expand Up @@ -3888,6 +3893,7 @@ <h2 id="152-simple-identifier"><a id="SimpleIdentifier" href="#SimpleIdentifier"
<li>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)”.</li>
</ul>
<p>Non-normatively speaking it starts with a letter or underscore, followed by at most 127 letters, underscores or digits.</p>
<p>For maximum interoperability services SHOULD use simple identifiers that additionally only consist of characters from the Basic Latin code block and match the pattern <code>^[_A-Za-z][_A-Za-z0-9]*$</code>.</p>
</details>
<details open><summary>
<h2 id="153-qualified-name"><a id="QualifiedName" href="#QualifiedName">15.3 Qualified Name</a></h2>
Expand Down Expand Up @@ -4225,9 +4231,10 @@ <h1 id="17-conformance"><a id="Conformance" href="#Conformance">17 Conformance</
<ol start="14" type="1">
<li>SHOULD NOT have identifiers within a uniqueness scope (e.g. a schema, a structural type, or an entity container) that differ only by case</li>
</ol>
<p>In addition, OData 4.01 services:</p>
<p>In addition, OData 4.02 or greater services:</p>
<ol start="15" type="1">
<li>SHOULD NOT include constant <a href="#GeoValues">Geo</a> or <a href="#StreamValues">Stream values</a> in annotations</li>
<li>SHOULD use <a href="#SimpleIdentifier">simple identifiers</a> matching the pattern <code>^[_A-Za-z][_A-Za-z0-9]*$</code></li>
</ol>
<p>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.</p>
</details>
Expand Down
8 changes: 7 additions & 1 deletion docs/odata-csdl-json/odata-csdl-json.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |

## <a id="Glossary" href="#Glossary">1.2 Glossary</a>
Expand Down Expand Up @@ -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]*$`.

## <a id="QualifiedName" href="#QualifiedName">15.3 Qualified Name</a>

For model elements that are direct children of a schema: the namespace
Expand Down Expand Up @@ -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
Expand Down
9 changes: 8 additions & 1 deletion docs/odata-csdl-xml/odata-csdl-xml.html
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,11 @@ <h2 id="11-changes-from-earlier-versions"><a id="ChangesfromEarlierVersions" hre
<td><a href="https://github.com/oasis-tcs/odata-specs/issues/326">326</a></td>
</tr>
<tr class="odd">
<td><a href="#SimpleIdentifier">Section 15.2</a></td>
<td>Prefer identifiers consisting only of latin letters, the underscore, and decimal numbers</td>
<td><a href="https://github.com/oasis-tcs/odata-specs/issues/375">375</a></td>
</tr>
<tr class="even">
<td><a href="#Conformance">Section 17</a></td>
<td>Additional conformance clauses for version 4.02</td>
<td></td>
Expand Down Expand Up @@ -3642,6 +3647,7 @@ <h2 id="152-simple-identifier"><a id="SimpleIdentifier" href="#SimpleIdentifier"
<li>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)”.</li>
</ul>
<p>Non-normatively speaking it starts with a letter or underscore, followed by at most 127 letters, underscores or digits.</p>
<p>For maximum interoperability services SHOULD use simple identifiers that additionally only consist of characters from the Basic Latin code block and match the pattern <code>^[_A-Za-z][_A-Za-z0-9]*$</code>.</p>
</details>
<details open><summary>
<h2 id="153-qualified-name"><a id="QualifiedName" href="#QualifiedName">15.3 Qualified Name</a></h2>
Expand Down Expand Up @@ -3861,9 +3867,10 @@ <h1 id="17-conformance"><a id="Conformance" href="#Conformance">17 Conformance</
<ol start="14" type="1">
<li>SHOULD NOT have identifiers within a uniqueness scope (e.g. a schema, a structural type, or an entity container) that differ only by case</li>
</ol>
<p>In addition, OData 4.01 services:</p>
<p>In addition, OData 4.02 or greater services:</p>
<ol start="15" type="1">
<li>SHOULD NOT include constant <a href="#GeoValues">Geo</a> or <a href="#StreamValues">Stream values</a> in annotations</li>
<li>SHOULD use <a href="#SimpleIdentifier">simple identifiers</a> matching the pattern <code>^[_A-Za-z][_A-Za-z0-9]*$</code></li>
</ol>
<p>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.</p>
</details>
Expand Down
8 changes: 7 additions & 1 deletion docs/odata-csdl-xml/odata-csdl-xml.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |

## <a id="Glossary" href="#Glossary">1.2 Glossary</a>
Expand Down Expand Up @@ -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]*$`.

## <a id="QualifiedName" href="#QualifiedName">15.3 Qualified Name</a>

For model elements that are direct children of a schema: the namespace
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions odata-csdl/1 Introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion odata-csdl/15 Identifier and Path Values.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 616b74d

Please sign in to comment.