Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ODATA-1496 #228

Merged
merged 17 commits into from
Jan 31, 2024
18 changes: 9 additions & 9 deletions docs/odata-csdl-json/odata-csdl-json.html
Original file line number Diff line number Diff line change
Expand Up @@ -1977,7 +1977,7 @@ <h1 id="14-vocabulary-and-annotation"><a name="VocabularyandAnnotation" href="#V
<p>A <em>vocabulary</em> is a schema containing a set of terms where each <a href="#Term">term</a> is a named metadata extension. Anyone can define a vocabulary (a set of terms) that is scenario-specific or company-specific; more commonly used terms can be published as shared vocabularies such as the OData Core vocabulary <a href="#ODataVocCore">OData-VocCore</a>.</p>
<p>A <a href="#Term">term</a> can be used to:</p>
<ul>
<li>Extend model elements and type instances with additional information.</li>
<li>Extend model elements and type instances with additional information. Type instances are instances of a <a href="#PrimitiveTypes">primitive type</a>, including <a href="#TypeDefinition">type definitions</a> and <a href="#EnumerationType">enumeration types</a>, of an <a href="#EntityType">entity type</a>, or of a <a href="#ComplexType">complex type</a>.</li>
<li>Map instances of annotated structured types to an interface defined by the term type; i.e. annotations allow viewing instances of a structured type as instances of a differently structured type specified by the applied term.</li>
</ul>
<p>A service SHOULD NOT require a client to interpret annotations. Clients SHOULD ignore invalid or unknown terms and silently treat unexpected or invalid values (including invalid type, invalid literal expression, invalid targets, etc.) as an unknown value for the term. Unknown or invalid annotations should never result in an error, as long as the payload remains well-formed.</p>
Expand Down Expand Up @@ -2512,8 +2512,8 @@ <h2 id="144-dynamic-expression"><a name="DynamicExpression" href="#DynamicExpres
<h3 id="1441-path-expressions"><a name="PathExpressions" href="#PathExpressions">14.4.1 Path Expressions</a></h3>
<p>Path expressions allow assigning a value to an applied term or term component. There are two kinds of path expressions:</p>
<ul>
<li>A <em>model path</em> is used within <a href="#AnnotationPath">Annotation Path</a>, <a href="#ModelElementPath">Model Element Path</a>, <a href="#NavigationPropertyPath">Navigation Property Path</a>, and <a href="#PropertyPath">Property Path</a> expressions to traverse the model of a service and resolves to the model element identified by the path. It allows assigning values to terms or term properties of the <a href="#BuiltInTypesfordefiningVocabularyTerms">built-in types</a> <code>Edm.AnnotationPath</code>, <code>Edm.NavigationPropertyPath</code>, <code>Edm.PropertyPath</code>, and their base types <code>Edm.AnyPropertyPath</code> and <code>Edm.ModelElementPath</code>.</li>
<li>An <em>instance path</em> is used within a <a href="#ValuePath">Value Path</a> expression to traverse a graph of type instances and resolves to the value identified by the path. It allows assigning values to terms or term properties of built-in types other than the <code>Edm.*Path</code> types, or of any model-defined type.</li>
<li>A <em>model path</em> is evaluated on the entity model of a service and resolves to a model element. Model paths are used within <a href="#AnnotationPath">Annotation Path</a>, <a href="#ModelElementPath">Model Element Path</a>, <a href="#NavigationPropertyPath">Navigation Property Path</a>, and <a href="#PropertyPath">Property Path</a> expressions. They allow assigning values to terms or term properties of the <a href="#BuiltInTypesfordefiningVocabularyTerms">built-in types</a> <code>Edm.AnnotationPath</code>, <code>Edm.ModelElementPath</code>, <code>Edm.NavigationPropertyPath</code>, <code>Edm.PropertyPath</code>, and <code>Edm.AnyPropertyPath</code>.</li>
<li>An <em>instance path</em> is evaluated on a type instance and its nested or related type instances and resolves to the instance or collection of instances identified by the path. Instance paths are used within <a href="#ValuePath">Value Path</a> expressions. They allow assigning values to terms or term properties of model-defined types or of built-in types other than the <code>Edm.*Path</code> types.</li>
</ul>
<h4 id="14411-path-syntax"><a name="PathSyntax" href="#PathSyntax">14.4.1.1 Path Syntax</a></h4>
<p>Model paths and instance paths share a common syntax which is derived from the path expression syntax of URLs, see <a href="#ODataURL">OData-URL</a>.</p>
Expand Down Expand Up @@ -2656,10 +2656,10 @@ <h4 id="14412-path-evaluation"><a name="PathEvaluation" href="#PathEvaluation">1
<h4 id="14413-annotation-path"><a name="AnnotationPath" href="#AnnotationPath">14.4.1.3 Annotation Path</a></h4>
<p>The annotation path expression provides a value for terms or term properties that specify the <a href="#BuiltInTypesfordefiningVocabularyTerms">built-in types</a> <code>Edm.AnnotationPath</code> or <code>Edm.ModelElementPath</code>. Its argument is a <a href="#PathExpressions">model path</a> with the following restriction:</p>
<ul>
<li>A non-null path MUST resolve to an annotation.</li>
<li>A non-null path MUST resolve to an <a href="#Annotation">annotation</a>.</li>
</ul>
<p>A term or term property of type <code>Edm.AnnotationPath</code> can be annotated with the term <code>Validation.AllowedTerms</code> (see <a href="#ODataVocValidation">OData-VocValidation</a>) if its intended value is an annotation path that ends in a term cast with one of the listed terms.</p>
<p>The value of the annotation path expression is the path itself, not the value of the annotation identified by the path. This is useful for terms that reuse or refer to other terms.</p>
<p>The value of the annotation path expression is the annotation identified by the path, not the value of this annotation. This is useful for terms that reuse or refer to other terms.</p>
<p>A term or term property of type <code>Edm.AnnotationPath</code> can be annotated with the term <code>Validation.AllowedTerms</code> (see <a href="#ODataVocValidation">OData-VocValidation</a>) if its intended value is an annotation that applies one of the listed terms.</p>
<div class="varjson rep">
<p>Annotation path expressions are represented as a string containing a path.</p>
</div>
Expand All @@ -2673,7 +2673,7 @@ <h4 id="14413-annotation-path"><a name="AnnotationPath" href="#AnnotationPath">1
</div>
<h4 id="14414-model-element-path"><a name="ModelElementPath" href="#ModelElementPath">14.4.1.4 Model Element Path</a></h4>
<p>The model element path expression provides a value for terms or term properties that specify the <a href="#BuiltInTypesfordefiningVocabularyTerms">built-in type</a> <code>Edm.ModelElementPath</code>. Its argument is a <a href="#PathExpressions">model path</a>.</p>
<p>The value of the model element path expression is the path itself, not the instance(s) identified by the path.</p>
<p>The value of the model element path expression is the model element identified by the path, not its instances.</p>
<div class="varjson rep">
<p>Model element path expressions are represented as a string containing a path.</p>
</div>
Expand All @@ -2686,7 +2686,7 @@ <h4 id="14415-navigation-property-path"><a name="NavigationPropertyPath" href="#
<ul>
<li>A non-null path MUST resolve to a model element whose type is an entity type, or a collection of entity types, e.g. a navigation property.</li>
</ul>
<p>The value of the navigation property path expression is the path itself, not the entitiy or collection of entities identified by the path.</p>
<p>The value of the navigation property path expression is the model element, not its instances.</p>
<div class="varjson rep">
<p>Navigation property path expressions are represented as a string containing a path.</p>
</div>
Expand All @@ -2705,7 +2705,7 @@ <h4 id="14416-property-path"><a name="PropertyPath" href="#PropertyPath">14.4.1.
<ul>
<li>A non-null path MUST resolve to a model element whose type is a primitive or complex type, an enumeration type, a type definition, or a collection of one of these types.</li>
</ul>
<p>The value of the property path expression is the path itself, not the value of the structural property or the value of the term cast identified by the path.</p>
<p>The value of the property path expression is the model element, not its instances.</p>
<div class="varjson rep">
<p>Property path expressions are represented as a string containing a path.</p>
</div>
Expand Down
50 changes: 23 additions & 27 deletions docs/odata-csdl-json/odata-csdl-json.md
Original file line number Diff line number Diff line change
Expand Up @@ -3495,7 +3495,9 @@ vocabularies such as the OData Core vocabulary

A [term](#Term) can be used to:
- Extend model elements and type instances
with additional information.
with additional information. Type instances are instances of a [primitive type](#PrimitiveTypes),
including [type definitions](#TypeDefinition) and [enumeration types](#EnumerationType),
of an [entity type](#EntityType), or of a [complex type](#ComplexType).
- Map instances of annotated structured
types to an interface defined by the term type; i.e. annotations allow
viewing instances of a structured type as instances of a differently
Expand Down Expand Up @@ -4130,20 +4132,18 @@ term.

Path expressions allow assigning a value to an applied term or term
component. There are two kinds of path expressions:
- A *model path* is used within
- A *model path* is evaluated on the entity model of a service and resolves to a model element.
Model paths are used within
[Annotation Path](#AnnotationPath), [Model Element Path](#ModelElementPath),
[Navigation Property Path](#NavigationPropertyPath), and [Property
Path](#PropertyPath) expressions to traverse the model of a service and
resolves to the model element identified by the path. It allows
assigning values to terms or term properties of the [built-in
types](#BuiltInTypesfordefiningVocabularyTerms) `Edm.AnnotationPath`,
`Edm.NavigationPropertyPath`, `Edm.PropertyPath`, and their base types
`Edm.AnyPropertyPath` and `Edm.ModelElementPath`.
- An *instance path* is used within a
[Value Path](#ValuePath) expression to traverse a graph of type
instances and resolves to the value identified by the path. It allows
assigning values to terms or term properties of built-in types other
than the `Edm.*Path` types, or of any model-defined type.
[Navigation Property Path](#NavigationPropertyPath), and [Property Path](#PropertyPath) expressions.
They allow assigning values to terms or term properties of the [built-in types](#BuiltInTypesfordefiningVocabularyTerms) `Edm.AnnotationPath`,
`Edm.ModelElementPath`, `Edm.NavigationPropertyPath`, `Edm.PropertyPath`, and
`Edm.AnyPropertyPath`.
- An *instance path* is evaluated on a type instance and its nested or related type instances
and resolves to the instance or collection of instances identified by the path.
Instance paths are used within [Value Path](#ValuePath) expressions.
They allow assigning values to terms or term properties of model-defined types or of built-in types other
than the `Edm.*Path` types.

#### <a name="PathSyntax" href="#PathSyntax">14.4.1.1 Path Syntax</a>

Expand Down Expand Up @@ -4477,16 +4477,16 @@ properties that specify the [built-in
types](#BuiltInTypesfordefiningVocabularyTerms)
`Edm.AnnotationPath` or `Edm.ModelElementPath`. Its argument is a [model
path](#PathExpressions) with the following restriction:
- A non-null path MUST resolve to an annotation.
- A non-null path MUST resolve to an [annotation](#Annotation).

The value of the annotation path expression is the annotation identified by the path, not the
value of this annotation. This is useful for terms
that reuse or refer to other terms.

A term or term property of type `Edm.AnnotationPath` can be annotated
with the term `Validation.AllowedTerms` (see
[OData-VocValidation](#ODataVocValidation)) if its intended value is an
annotation path that ends in a term cast with one of the listed terms.

The value of the annotation path expression is the path itself, not the
value of the annotation identified by the path. This is useful for terms
that reuse or refer to other terms.
annotation that applies one of the listed terms.

::: {.varjson .rep}
Annotation path expressions are represented as a string containing a
Expand All @@ -4513,8 +4513,7 @@ properties that specify the [built-in
type](#BuiltInTypesfordefiningVocabularyTerms) `Edm.ModelElementPath`. Its
argument is a [model path](#PathExpressions).

The value of the model element path expression is the path itself, not
the instance(s) identified by the path.
The value of the model element path expression is the model element identified by the path, not its instances.

::: {.varjson .rep}
Model element path expressions are represented as a string containing a
Expand Down Expand Up @@ -4542,8 +4541,7 @@ restriction:
element whose type is an entity type, or a collection of entity types,
e.g. a navigation property.

The value of the navigation property path expression is the path itself,
not the entitiy or collection of entities identified by the path.
The value of the navigation property path expression is the model element, not its instances.

::: {.varjson .rep}
Navigation property path expressions are represented as a string
Expand Down Expand Up @@ -4577,9 +4575,7 @@ restriction:
element whose type is a primitive or complex type, an enumeration type,
a type definition, or a collection of one of these types.

The value of the property path expression is the path itself, not the
value of the structural property or the value of the term cast
identified by the path.
The value of the property path expression is the model element, not its instances.

::: {.varjson .rep}
Property path expressions are represented as a string containing a path.
Expand Down
Loading