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-1370: Name uniqueness of operations and their overloads #244

Draft
wants to merge 4 commits into
base: 1370-2
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
255 changes: 132 additions & 123 deletions docs/odata-csdl-json/odata-csdl-json.html

Large diffs are not rendered by default.

270 changes: 141 additions & 129 deletions docs/odata-csdl-json/odata-csdl-json.md

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions docs/odata-csdl-xml/odata-csdl-xml.html
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ <h1 id="5-schema"><a name="Schema" href="#Schema">5 Schema</a></h1>
<div class="varxml rep">
<h3 id="element-edmschema"><a name="ElementedmSchema.7" href="#ElementedmSchema.7">Element <code>edm:Schema</code></a></h3>
<p>The <code>edm:Schema</code> element defines a schema. It MUST contain the <code>Namespace</code> attribute and it MAY contain the <code>Alias</code> attribute.</p>
<p>It MAY contain elements <a href="#Action"><code>edm:Action</code></a>, <a href="#AnnotationswithExternalTargeting"><code>edm:Annotations</code></a>, <a href="#Annotation"><code>edm:Annotation</code></a>, <a href="#ComplexType"><code>edm:ComplexType</code></a>, <a href="#EntityContainer"><code>edm:EntityContainer</code></a>, <a href="#EntityType"><code>edm:EntityType</code></a>, <a href="#EnumerationType"><code>edm:EnumType</code></a>, <a href="#Function"><code>edm:Function</code></a>, <a href="#Term"><code>edm:Term</code></a>, or <a href="#TypeDefinition"><code>edm:TypeDefinition</code></a>.</p>
<p>It MAY contain elements representing its direct children: <a href="#Action"><code>edm:Action</code></a>, <a href="#AnnotationswithExternalTargeting"><code>edm:Annotations</code></a>, <a href="#Annotation"><code>edm:Annotation</code></a>, <a href="#ComplexType"><code>edm:ComplexType</code></a>, <a href="#EntityContainer"><code>edm:EntityContainer</code></a>, <a href="#EntityType"><code>edm:EntityType</code></a>, <a href="#EnumerationType"><code>edm:EnumType</code></a>, <a href="#Function"><code>edm:Function</code></a>, <a href="#Term"><code>edm:Term</code></a>, or <a href="#TypeDefinition"><code>edm:TypeDefinition</code></a>.</p>
<h3 id="attribute-namespace-1"><a name="AttributeNamespace.7.1" href="#AttributeNamespace.7.1">Attribute <code>Namespace</code></a></h3>
<p>The value of <code>Namespace</code> is the namespace of the schema</p>
</div>
Expand Down Expand Up @@ -974,7 +974,7 @@ <h3 id="attribute-qualifier-1"><a name="AttributeQualifier.8.2" href="#Attribute
<hr />
<h1 id="6-entity-type"><a name="EntityType" href="#EntityType">6 Entity Type</a></h1>
<p>Entity types are <a href="#NominalTypes">nominal</a> <a href="#StructuredTypes">structured types</a> with a key that consists of one or more references to <a href="#StructuralProperty">structural properties</a>. An entity type is the template for an entity: any uniquely identifiable record such as a customer or order.</p>
<p>The entity type’s name is a <a href="#SimpleIdentifier">simple identifier</a> that MUST be unique within its schema.</p>
<p>The entity type’s name is a <a href="#SimpleIdentifier">simple identifier</a> that MUST be unique among all direct children of its <a href="#Schema">schema</a>.</p>
<p>An entity type can define two types of properties. A <a href="#StructuralProperty">structural property</a> is a named reference to a primitive, complex, or enumeration type, or a collection of primitive, complex, or enumeration types. A <a href="#NavigationProperty">navigation property</a> is a named reference to another entity type or collection of entity types.</p>
<p>All properties MUST have a unique name within an entity type. Properties MUST NOT have the same name as the declaring entity type. They MAY have the same name as one of the direct or indirect base types or derived types.</p>
<div class="varxml rep">
Expand Down Expand Up @@ -1327,7 +1327,7 @@ <h3 id="attribute-action"><a name="AttributeAction.15.1" href="#AttributeAction.
<hr />
<h1 id="9-complex-type"><a name="ComplexType" href="#ComplexType">9 Complex Type</a></h1>
<p>Complex types are keyless <a href="#NominalTypes">nominal</a> <a href="#StructuredTypes">structured types</a>. The lack of a key means that instances of complex types cannot be referenced, created, updated or deleted independently of an entity type. Complex types allow entity models to group properties into common structures.</p>
<p>The complex type’s name is a <a href="#SimpleIdentifier">simple identifier</a> that MUST be unique within its schema.</p>
<p>The complex type’s name is a <a href="#SimpleIdentifier">simple identifier</a> that MUST be unique among all direct children of its <a href="#Schema">schema</a>.</p>
<p>A complex type can define two types of properties. A <a href="#StructuralProperty">structural property</a> is a named reference to a primitive, complex, or enumeration type, or a collection of primitive, complex, or enumeration types. A <a href="#NavigationProperty">navigation property</a> is a named reference to an entity type or a collection of entity types.</p>
<p>All properties MUST have a unique name within a complex type. Properties MUST NOT have the same name as the declaring complex type. They MAY have the same name as one of the direct or indirect base types or derived types.</p>
<div class="varxml rep">
Expand Down Expand Up @@ -1383,7 +1383,7 @@ <h3><a name="AttributeOpenType.16.4" href="#AttributeOpenType.16.4">Attribute <c
<hr />
<h1 id="10-enumeration-type"><a name="EnumerationType" href="#EnumerationType">10 Enumeration Type</a></h1>
<p>Enumeration types are <a href="#NominalTypes">nominal</a> types that represent a non-empty series of related values. Enumeration types expose these related values as members of the enumeration.</p>
<p>The enumeration type’s name is a <a href="#SimpleIdentifier">simple identifier</a> that MUST be unique within its schema.</p>
<p>The enumeration type’s name is a <a href="#SimpleIdentifier">simple identifier</a> that MUST be unique among all direct children of its <a href="#Schema">schema</a>.</p>
<p>Although enumeration types have an underlying numeric value, the preferred representation for an enumeration value is the member name. Discrete sets of numeric values should be represented as numeric values annotated with the <code>AllowedValues</code> annotation defined in <a href="#ODataVocCore">OData-VocCore</a>.</p>
<p>Enumeration types marked as flags allow values that consist of more than one enumeration member at a time.</p>
<div class="varxml rep">
Expand Down Expand Up @@ -1471,7 +1471,7 @@ <h3 id="attribute-value"><a name="AttributeValue.18.2" href="#AttributeValue.18.
<hr />
<h1 id="11-type-definition"><a name="TypeDefinition" href="#TypeDefinition">11 Type Definition</a></h1>
<p>A type definition defines a specialization of one of the <a href="#PrimitiveTypes">primitive types</a> or of the built-in abstract type <a href="#BuiltInAbstractTypes"><code>Edm.PrimitiveType</code></a>.</p>
<p>The type definition’s name is a <a href="#SimpleIdentifier">simple identifier</a> that MUST be unique within its schema.</p>
<p>The type definition’s name is a <a href="#SimpleIdentifier">simple identifier</a> that MUST be unique among all direct children of its <a href="#Schema">schema</a>.</p>
<p>Type definitions can be used wherever a primitive type is used (other than as the underlying type in a new type definition) and are type-comparable with their underlying types and any type definitions defined using the same underlying type.</p>
<p>It is up to the definition of a term to specify whether and how annotations with this term propagate to places where the annotated type definition is used, and whether they can be overridden.</p>
<div class="varxml rep">
Expand Down Expand Up @@ -1512,38 +1512,38 @@ <h3><a name="AttributeUnderlyingType.19.2" href="#AttributeUnderlyingType.19.2">
<h1 id="12-action-and-function"><a name="ActionandFunction" href="#ActionandFunction">12 Action and Function</a></h1>
<h2 id="121-action"><a name="Action" href="#Action">12.1 Action</a></h2>
<p>Actions are service-defined operations that MAY have observable side effects and MAY return a single instance or a collection of instances of any type.</p>
<p>The action’s name is a <a href="#SimpleIdentifier">simple identifier</a>. The name of the action, excepting any <a href="#ActionOverloads">overloads</a>, MUST be unique within its schema.</p>
<p>The action’s name is a <a href="#SimpleIdentifier">simple identifier</a>. If two or more actions within one <a href="#Schema">schema</a> have the same name, they are called <a href="#ActionOverloads">overloads</a> of the same action. The name of an action MUST NOT be used by any other direct children of its schema. (An action with a unique name can also be viewed as an action with a single overload.)</p>
<p>Actions cannot be composed with additional path segments.</p>
<p>An action MAY specify a <a href="#ReturnType">return type</a> that MUST be a primitive, entity or complex type, or a collection of primitive, entity or complex types in scope.</p>
<p>An action MAY define <a href="#Parameter">parameters</a> used during the execution of the action.</p>
<div class="varxml rep">
<h3 id="element-edmaction"><a name="ElementedmAction.20" href="#ElementedmAction.20">Element <code>edm:Action</code></a></h3>
<p>The <code>edm:Action</code> element MUST contain the <code>Name</code> attribute and it MAY contain the <a href="#BoundorUnboundActionsorFunctions"><code>IsBound</code></a> and <a href="#EntitySetPath"><code>EntitySetPath</code></a> attributes.</p>
<p>The <code>edm:Action</code> element represents an action with unique name or one overload of an action. It MUST contain the <code>Name</code> attribute and it MAY contain the <a href="#BoundorUnboundActionsorFunctions"><code>IsBound</code></a> and <a href="#EntitySetPath"><code>EntitySetPath</code></a> attributes.</p>
<p>It MAY contain at most one <a href="#ReturnType"><code>edm:ReturnType</code></a> element and MAY contain <a href="#Parameter"><code>edm:Parameter</code></a> elements.</p>
<p>It MAY contain <a href="#Annotation"><code>edm:Annotation</code></a> elements.</p>
<h3 id="attribute-name-8"><a name="AttributeName.20.1" href="#AttributeName.20.1">Attribute <code>Name</code></a></h3>
<p>The value of <code>Name</code> is the action’s name.</p>
</div>
<h3 id="1211-action-overloads"><a name="ActionOverloads" href="#ActionOverloads">12.1.1 Action Overloads</a></h3>
<p><a href="#BoundorUnboundActionsorFunctions">Bound</a> actions support overloading (multiple actions having the same name within the same schema) by binding parameter type. The combination of action name and the binding parameter type MUST be unique within a schema.</p>
<p><a href="#BoundorUnboundActionsorFunctions">Unbound</a> actions do not support overloads. The names of all unbound actions MUST be unique within a schema.</p>
<p><a href="#BoundorUnboundActionsorFunctions">Bound</a> actions support overloading by binding parameter type. The combination of action name and the binding parameter type MUST be unique within a schema.</p>
<p><a href="#BoundorUnboundActionsorFunctions">Unbound</a> actions do not support overloading by parameter types. The names of all unbound actions MUST be unique among all direct children of its schema.</p>
<p>An unbound action MAY have the same name as a bound action.</p>
<h2 id="122-function"><a name="Function" href="#Function">12.2 Function</a></h2>
<p>Functions are service-defined operations that MUST NOT have observable side effects and MUST return a single instance or a collection of instances of any type.</p>
<p>The function’s name is a <a href="#SimpleIdentifier">simple identifier</a>. The name of the function, excepting any <a href="#FunctionOverloads">overloads</a>, MUST be unique within its schema.</p>
<p>The function’s name is a <a href="#SimpleIdentifier">simple identifier</a>. If two or more functions within one <a href="#Schema">schema</a> have the same name, they are called <a href="#FunctionOverloads">overloads</a> of the same function. The name of a function MUST NOT be used by any other direct children of its schema. (A function with a unique name can also be viewed as a function with a single overload.)</p>
<p>Functions MAY be <a href="#ComposableFunction">composable</a>.</p>
<p>The function MUST specify a <a href="#ReturnType">return type</a> which MUST be a primitive, entity or complex type, or a collection of primitive, entity or complex types in scope.</p>
<p>A function MAY define <a href="#Parameter">parameters</a> used during the execution of the function.</p>
<div class="varxml rep">
<h3 id="element-edmfunction"><a name="ElementedmFunction.21" href="#ElementedmFunction.21">Element <code>edm:Function</code></a></h3>
<p>The <code>edm:Function</code> element MUST contain the <code>Name</code> attribute and it MAY contain the <a href="#BoundorUnboundActionsorFunctions"><code>IsBound</code></a> and <a href="#EntitySetPath"><code>EntitySetPath</code></a> attributes.</p>
<p>The <code>edm:Function</code> element represents a function with unique name or one overload of a function. It MUST contain the <code>Name</code> attribute and it MAY contain the <a href="#BoundorUnboundActionsorFunctions"><code>IsBound</code></a> and <a href="#EntitySetPath"><code>EntitySetPath</code></a> attributes.</p>
<p>It MUST contain one <a href="#ReturnType"><code>edm:ReturnType</code></a> element, and it MAY contain <a href="#Parameter"><code>edm:Parameter</code></a> elements.</p>
<p>It MAY contain <a href="#Annotation"><code>edm:Annotation</code></a> elements.</p>
<h3 id="attribute-name-9"><a name="AttributeName.21.1" href="#AttributeName.21.1">Attribute <code>Name</code></a></h3>
<p>The value of <code>Name</code> is the action’s name.</p>
</div>
<h3 id="1221-function-overloads"><a name="FunctionOverloads" href="#FunctionOverloads">12.2.1 Function Overloads</a></h3>
<p><a href="#BoundorUnboundActionsorFunctions">Bound</a> functions support overloading (multiple functions having the same name within the same schema) subject to the following rules:</p>
<p><a href="#BoundorUnboundActionsorFunctions">Bound</a> functions support overloading subject to the following rules:</p>
<ul>
<li>The combination of function name, binding parameter type, and unordered set of non-binding parameter names MUST be unique within a schema.</li>
<li>The combination of function name, binding parameter type, and ordered set of parameter types MUST be unique within a schema.</li>
Expand Down Expand Up @@ -1628,7 +1628,7 @@ <h3 id="attribute-nullable-3"><a name="AttributeNullable.23.3" href="#AttributeN
<hr />
<h1 id="13-entity-container"><a name="EntityContainer" href="#EntityContainer">13 Entity Container</a></h1>
<p>Each metadata document used to describe an OData service MUST define exactly one entity container.</p>
<p>The entity container’s name is a <a href="#SimpleIdentifier">simple identifier</a> that MUST be unique within its schema.</p>
<p>The entity container’s name is a <a href="#SimpleIdentifier">simple identifier</a> that MUST be unique among all direct children of its <a href="#Schema">schema</a>.</p>
<p>Entity containers define the entity sets, singletons, function and action imports exposed by the service.</p>
<p>Entity set, singleton, action import, and function import names MUST be unique within an entity container.</p>
<p>An <a href="#EntitySet"><em>entity set</em></a> allows access to entity type instances. Simple entity models frequently have one entity set per entity type.</p>
Expand Down Expand Up @@ -1851,7 +1851,7 @@ <h1 id="14-vocabulary-and-annotation"><a name="VocabularyandAnnotation" href="#V
</div>
<h2 id="141-term"><a name="Term" href="#Term">14.1 Term</a></h2>
<p>A term allows annotating a model element or OData resource representation with additional data.</p>
<p>The term’s name is a <a href="#SimpleIdentifier">simple identifier</a> that MUST be unique within its schema.</p>
<p>The term’s name is a <a href="#SimpleIdentifier">simple identifier</a> that MUST be unique among all direct children of its <a href="#Schema">schema</a>.</p>
<p>The term’s type MUST be a type in scope, or a collection of a type in scope.</p>
<div class="varxml rep">
<h3 id="element-edmterm"><a name="ElementedmTerm.30" href="#ElementedmTerm.30">Element <code>edm:Term</code></a></h3>
Expand Down
Loading