From cfc6026672b76107024b22d63c1fad704c0e17b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Heiko=20Thei=C3=9Fen?= Date: Thu, 8 Feb 2024 08:50:18 +0100 Subject: [PATCH 1/2] As promised in TC 2024-02-07 --- docs/odata-csdl-json/odata-csdl-json.html | 28 ++++++------- docs/odata-csdl-json/odata-csdl-json.md | 49 ++++++++++++---------- docs/odata-csdl-xml/odata-csdl-xml.html | 28 ++++++------- docs/odata-csdl-xml/odata-csdl-xml.md | 41 ++++++++++-------- odata-csdl/12 Action and Function.md | 46 +++++++++++--------- odata-csdl/13 Entity Container.md | 2 +- odata-csdl/14 Vocabulary and Annotation.md | 2 +- odata-csdl/5 Schema.md | 6 +-- odata-csdl/9 Complex Type.md | 6 +-- 9 files changed, 112 insertions(+), 96 deletions(-) diff --git a/docs/odata-csdl-json/odata-csdl-json.html b/docs/odata-csdl-json/odata-csdl-json.html index 6a311e3a8..d63be05bb 100644 --- a/docs/odata-csdl-json/odata-csdl-json.html +++ b/docs/odata-csdl-json/odata-csdl-json.html @@ -970,7 +970,7 @@

5 Schema

Schema Object

A schema is represented as a member of the document object whose name is the schema namespace. Its value is an object that MAY contain the members $Alias and $Annotations.

-

The schema object MAY contain members representing entity types, complex types, enumeration types, type definitions, actions, functions, terms, and an entity container.

+

The schema object MAY contain members representing its direct children: entity types, complex types, enumeration types, type definitions, actions, functions, terms, and an entity container.

The schema object MAY also contain annotations that apply to the schema itself.

5.1 Alias

@@ -1014,7 +1014,7 @@

$Annotations<

6 Entity Type

Entity types are nominal structured types with a key that consists of one or more references to structural properties. An entity type is the template for an entity: any uniquely identifiable record such as a customer or order.

-

The entity type’s name is a simple identifier that MUST be unique within its schema.

+

The entity type’s name is a simple identifier that MUST be unique among all direct children of its schema.

An entity type can define two types of properties. A structural property is a named reference to a primitive, complex, or enumeration type, or a collection of primitive, complex, or enumeration types. A navigation property is a named reference to another entity type or collection of entity types.

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.

@@ -1423,7 +1423,7 @@

$OnDelete


9 Complex Type

Complex types are keyless nominal structured types. 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.

-

The complex type’s name is a simple identifier that MUST be unique within its schema.

+

The complex type’s name is a simple identifier that MUST be unique among all direct children of its schema.

A complex type can define two types of properties. A structural property is a named reference to a primitive, complex, or enumeration type, or a collection of primitive, complex, or enumeration types. A navigation property is a named reference to an entity type or a collection of entity types.

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.

@@ -1493,7 +1493,7 @@

$OpenType


10 Enumeration Type

Enumeration types are nominal types that represent a non-empty series of related values. Enumeration types expose these related values as members of the enumeration.

-

The enumeration type’s name is a simple identifier that MUST be unique within its schema.

+

The enumeration type’s name is a simple identifier that MUST be unique among all direct children of its schema.

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 AllowedValues annotation defined in OData-VocCore.

Enumeration types marked as flags allow values that consist of more than one enumeration member at a time.

@@ -1579,7 +1579,7 @@

Enum

11 Type Definition

A type definition defines a specialization of one of the primitive types or of the built-in abstract type Edm.PrimitiveType.

-

The type definition’s name is a simple identifier that MUST be unique within its schema.

+

The type definition’s name is a simple identifier that MUST be unique among all direct children of its schema.

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.

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.

@@ -1625,34 +1625,34 @@

$UnderlyingT

12 Action and Function

12.1 Action

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.

-

The action’s name is a simple identifier. The name of the action, excepting any overloads, MUST be unique within its schema.

+

The action’s name is a simple identifier. If two or more actions within one schema have the same name, they are called overloads 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.)

Actions cannot be composed with additional path segments.

An action MAY specify a return type that MUST be a primitive, entity or complex type, or a collection of primitive, entity or complex types in scope.

An action MAY define parameters used during the execution of the action.

Action Object

-

An action is represented as a member of the schema object whose name is the unqualified name of the action and whose value is an array. The array contains one object per action overload.

+

An action or action overloads with a common name are represented as a member of the schema object whose name is the unqualified name of the action and whose value is an array. The array contains one object per action overload.

The action object MUST contain the member $Kind with a string value of Action.

It MAY contain the members $IsBound, $EntitySetPath, $Parameter, and $ReturnType, and it MAY contain annotations.

12.1.1 Action Overloads

-

Bound 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.

-

Unbound actions do not support overloads. The names of all unbound actions MUST be unique within a schema.

+

Bound actions support overloading by binding parameter type. The combination of action name and the binding parameter type MUST be unique within a schema.

+

Unbound actions do not support overloading by parameter types. The names of all unbound actions MUST be unique among all direct children of its schema.

An unbound action MAY have the same name as a bound action.

12.2 Function

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.

-

The function’s name is a simple identifier. The name of the function, excepting any overloads, MUST be unique within its schema.

+

The function’s name is a simple identifier. If two or more functions within one schema have the same name, they are called overloads 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.)

Functions MAY be composable.

The function MUST specify a return type which MUST be a primitive, entity or complex type, or a collection of primitive, entity or complex types in scope.

A function MAY define parameters used during the execution of the function.

Function Object

-

A function is represented as a member of the schema object whose name is the unqualified name of the function and whose value is an array. The array contains one object per function overload.

+

A function or function overloads with a common name are represented as a member of the schema object whose name is the unqualified name of the function and whose value is an array. The array contains one object per function overload.

The function object MUST contain the member $Kind with a string value of Function.

It MUST contain the member $ReturnType, and it MAY contain the members $IsBound, $EntitySetPath, and $Parameter, and it MAY contain annotations.

12.2.1 Function Overloads

-

Bound functions support overloading (multiple functions having the same name within the same schema) subject to the following rules:

+

Bound functions support overloading subject to the following rules:

  • The combination of function name, binding parameter type, and unordered set of non-binding parameter names MUST be unique within a schema.
  • The combination of function name, binding parameter type, and ordered set of parameter types MUST be unique within a schema.
  • @@ -1756,7 +1756,7 @@

    $Nullabl

    13 Entity Container

    Each metadata document used to describe an OData service MUST define exactly one entity container.

    -

    The entity container’s name is a simple identifier that MUST be unique within its schema.

    +

    The entity container’s name is a simple identifier that MUST be unique among all direct children of its schema.

    Entity containers define the entity sets, singletons, function and action imports exposed by the service.

    Entity set, singleton, action import, and function import names MUST be unique within an entity container.

    An entity set allows access to entity type instances. Simple entity models frequently have one entity set per entity type.

    @@ -2035,7 +2035,7 @@

    14.1 Term

    A term allows annotating a model element or OData resource representation with additional data.

    -

    The term’s name is a simple identifier that MUST be unique within its schema.

    +

    The term’s name is a simple identifier that MUST be unique among all direct children of its schema.

    The term’s type MUST be a type in scope, or a collection of a type in scope.

    Term Object

    diff --git a/docs/odata-csdl-json/odata-csdl-json.md b/docs/odata-csdl-json/odata-csdl-json.md index a6d3f3c06..888714a0b 100644 --- a/docs/odata-csdl-json/odata-csdl-json.md +++ b/docs/odata-csdl-json/odata-csdl-json.md @@ -1257,7 +1257,7 @@ the schema namespace. Its value is an object that MAY contain the members [`$Alias`](#Alias) and [`$Annotations`](#AnnotationswithExternalTargeting). -The schema object MAY contain members representing [entity +The schema object MAY contain members representing its direct children: [entity types](#EntityType), [complex types](#ComplexType), [enumeration types](#EnumerationType), [type definitions](#TypeDefinition), [actions](#Action), [functions](#Function), [terms](#Term), and an @@ -1353,7 +1353,7 @@ type is the template for an entity: any uniquely identifiable record such as a customer or order. The entity type's name is a [simple identifier](#SimpleIdentifier) that -MUST be unique within its schema. +MUST be unique among all direct children of its [schema](#Schema). An entity type can define two types of properties. A [structural property](#StructuralProperty) is a named reference to a primitive, @@ -2259,7 +2259,7 @@ independently of an entity type. Complex types allow entity models to group properties into common structures. The complex type's name is a [simple identifier](#SimpleIdentifier) that -MUST be unique within its schema. +MUST be unique among all direct children of its [schema](#Schema). A complex type can define two types of properties. A [structural property](#StructuralProperty) is a named reference to a primitive, @@ -2396,7 +2396,7 @@ non-empty series of related values. Enumeration types expose these related values as members of the enumeration. The enumeration type's name is a [simple identifier](#SimpleIdentifier) -that MUST be unique within its schema. +that MUST be unique among all direct children of its [schema](#Schema). Although enumeration types have an underlying numeric value, the preferred representation for an enumeration value is the member name. @@ -2564,7 +2564,7 @@ types](#PrimitiveTypes) or of the built-in abstract type [`Edm.PrimitiveType`](#BuiltInAbstractTypes). The type definition's name is a [simple identifier](#SimpleIdentifier) -that MUST be unique within its schema. +that MUST be unique among all direct children of its [schema](#Schema). Type definitions can be used wherever a primitive type is used (other than as the underlying type in a new type definition) and are @@ -2662,7 +2662,10 @@ 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. -The action's name is a [simple identifier](#SimpleIdentifier). The name of the action, excepting any [overloads](#ActionOverloads), MUST be unique within its schema. +The action's name is a [simple identifier](#SimpleIdentifier). If two or more +actions within one [schema](#Schema) have the same name, they are called [overloads](#ActionOverloads) 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.) Actions cannot be composed with additional path segments. @@ -2676,9 +2679,10 @@ of the action. ::: {.varjson .rep} ### Action Object -An action is represented as a member of the schema object whose name is -the unqualified name of the action and whose value is an array. The -array contains one object per action overload. +An action or action overloads with a common name are represented as a +member of the schema object whose name is the unqualified name of the action +and whose value is an array. The array contains one object per action +overload. The action object MUST contain the member `$Kind` with a string value of `Action`. @@ -2694,13 +2698,12 @@ It MAY contain the members ### 12.1.1 Action Overloads [Bound](#BoundorUnboundActionsorFunctions) actions support -overloading (multiple actions having the same name within the same -schema) by binding parameter type. The combination of action name and +overloading by binding parameter type. The combination of action name and the binding parameter type MUST be unique within a schema. [Unbound](#BoundorUnboundActionsorFunctions) actions do not support -overloads. The names of all unbound actions MUST be unique within a -schema. +overloading by parameter types. The names of all unbound actions MUST be unique +among all direct children of its schema. An unbound action MAY have the same name as a bound action. @@ -2710,8 +2713,10 @@ 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. -The function's name is a [simple identifier](#SimpleIdentifier). The name of the function, excepting any [overloads](#FunctionOverloads), -MUST be unique within its schema. +The function's name is a [simple identifier](#SimpleIdentifier). If two or more +functions within one [schema](#Schema) have the same name, they are called [overloads](#FunctionOverloads) 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.) Functions MAY be [composable](#ComposableFunction). @@ -2725,9 +2730,10 @@ of the function. ::: {.varjson .rep} ### Function Object -A function is represented as a member of the schema object whose name is -the unqualified name of the function and whose value is an array. The -array contains one object per function overload. +A function or function overloads with a common name are represented as a +member of the schema object whose name is the unqualified name of the function +and whose value is an array. The array contains one object per function +overload. The function object MUST contain the member `$Kind` with a string value of `Function`. @@ -2742,8 +2748,7 @@ and it MAY contain [annotations](#Annotation). ### 12.2.1 Function Overloads [Bound](#BoundorUnboundActionsorFunctions) functions support -overloading (multiple functions having the same name within the same -schema) subject to the following rules: +overloading subject to the following rules: - The combination of function name, binding parameter type, and unordered set of non-binding parameter names MUST be unique within a schema. @@ -2993,7 +2998,7 @@ Each metadata document used to describe an OData service MUST define exactly one entity container. The entity container's name is a [simple identifier](#SimpleIdentifier) -that MUST be unique within its schema. +that MUST be unique among all direct children of its [schema](#Schema). Entity containers define the entity sets, singletons, function and action imports exposed by the service. @@ -3590,7 +3595,7 @@ A term allows annotating a model element or OData resource representation with additional data. The term's name is a [simple identifier](#SimpleIdentifier) that MUST be -unique within its schema. +unique among all direct children of its [schema](#Schema). The term's type MUST be a type in scope, or a collection of a type in scope. diff --git a/docs/odata-csdl-xml/odata-csdl-xml.html b/docs/odata-csdl-xml/odata-csdl-xml.html index aad1ee17c..3763bffaf 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.html +++ b/docs/odata-csdl-xml/odata-csdl-xml.html @@ -932,7 +932,7 @@

    5 Schema

    Element edm:Schema

    The edm:Schema element defines a schema. It MUST contain the Namespace attribute and it MAY contain the Alias attribute.

    -

    It MAY contain elements edm:Action, edm:Annotations, edm:Annotation, edm:ComplexType, edm:EntityContainer, edm:EntityType, edm:EnumType, edm:Function, edm:Term, or edm:TypeDefinition.

    +

    It MAY contain elements representing its direct children: edm:Action, edm:Annotations, edm:Annotation, edm:ComplexType, edm:EntityContainer, edm:EntityType, edm:EnumType, edm:Function, edm:Term, or edm:TypeDefinition.

    Attribute Namespace

    The value of Namespace is the namespace of the schema

    @@ -972,7 +972,7 @@

    6 Entity Type

    Entity types are nominal structured types with a key that consists of one or more references to structural properties. An entity type is the template for an entity: any uniquely identifiable record such as a customer or order.

    -

    The entity type’s name is a simple identifier that MUST be unique within its schema.

    +

    The entity type’s name is a simple identifier that MUST be unique among all direct children of its schema.

    An entity type can define two types of properties. A structural property is a named reference to a primitive, complex, or enumeration type, or a collection of primitive, complex, or enumeration types. A navigation property is a named reference to another entity type or collection of entity types.

    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.

    @@ -1325,7 +1325,7 @@

    9 Complex Type

    Complex types are keyless nominal structured types. 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.

    -

    The complex type’s name is a simple identifier that MUST be unique within its schema.

    +

    The complex type’s name is a simple identifier that MUST be unique among all direct children of its schema.

    A complex type can define two types of properties. A structural property is a named reference to a primitive, complex, or enumeration type, or a collection of primitive, complex, or enumeration types. A navigation property is a named reference to an entity type or a collection of entity types.

    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.

    @@ -1381,7 +1381,7 @@

    Attribute

    10 Enumeration Type

    Enumeration types are nominal types that represent a non-empty series of related values. Enumeration types expose these related values as members of the enumeration.

    -

    The enumeration type’s name is a simple identifier that MUST be unique within its schema.

    +

    The enumeration type’s name is a simple identifier that MUST be unique among all direct children of its schema.

    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 AllowedValues annotation defined in OData-VocCore.

    Enumeration types marked as flags allow values that consist of more than one enumeration member at a time.

    @@ -1469,7 +1469,7 @@

    11 Type Definition

    A type definition defines a specialization of one of the primitive types or of the built-in abstract type Edm.PrimitiveType.

    -

    The type definition’s name is a simple identifier that MUST be unique within its schema.

    +

    The type definition’s name is a simple identifier that MUST be unique among all direct children of its schema.

    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.

    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.

    @@ -1510,38 +1510,38 @@

    12 Action and Function

    12.1 Action

    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.

    -

    The action’s name is a simple identifier. The name of the action, excepting any overloads, MUST be unique within its schema.

    +

    The action’s name is a simple identifier. If two or more actions within one schema have the same name, they are called overloads 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.)

    Actions cannot be composed with additional path segments.

    An action MAY specify a return type that MUST be a primitive, entity or complex type, or a collection of primitive, entity or complex types in scope.

    An action MAY define parameters used during the execution of the action.

    Element edm:Action

    -

    The edm:Action element MUST contain the Name attribute and it MAY contain the IsBound and EntitySetPath attributes.

    +

    The edm:Action element represents an action with unique name or one overload of an action. It MUST contain the Name attribute and it MAY contain the IsBound and EntitySetPath attributes.

    It MAY contain at most one edm:ReturnType element and MAY contain edm:Parameter elements.

    It MAY contain edm:Annotation elements.

    Attribute Name

    The value of Name is the action’s name.

    12.1.1 Action Overloads

    -

    Bound 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.

    -

    Unbound actions do not support overloads. The names of all unbound actions MUST be unique within a schema.

    +

    Bound actions support overloading by binding parameter type. The combination of action name and the binding parameter type MUST be unique within a schema.

    +

    Unbound actions do not support overloading by parameter types. The names of all unbound actions MUST be unique among all direct children of its schema.

    An unbound action MAY have the same name as a bound action.

    12.2 Function

    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.

    -

    The function’s name is a simple identifier. The name of the function, excepting any overloads, MUST be unique within its schema.

    +

    The function’s name is a simple identifier. If two or more functions within one schema have the same name, they are called overloads 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.)

    Functions MAY be composable.

    The function MUST specify a return type which MUST be a primitive, entity or complex type, or a collection of primitive, entity or complex types in scope.

    A function MAY define parameters used during the execution of the function.

    Element edm:Function

    -

    The edm:Function element MUST contain the Name attribute and it MAY contain the IsBound and EntitySetPath attributes.

    +

    The edm:Function element represents a function with unique name or one overload of a function. It MUST contain the Name attribute and it MAY contain the IsBound and EntitySetPath attributes.

    It MUST contain one edm:ReturnType element, and it MAY contain edm:Parameter elements.

    It MAY contain edm:Annotation elements.

    Attribute Name

    The value of Name is the action’s name.

    12.2.1 Function Overloads

    -

    Bound functions support overloading (multiple functions having the same name within the same schema) subject to the following rules:

    +

    Bound functions support overloading subject to the following rules:

    • The combination of function name, binding parameter type, and unordered set of non-binding parameter names MUST be unique within a schema.
    • The combination of function name, binding parameter type, and ordered set of parameter types MUST be unique within a schema.
    • @@ -1626,7 +1626,7 @@

      13 Entity Container

      Each metadata document used to describe an OData service MUST define exactly one entity container.

      -

      The entity container’s name is a simple identifier that MUST be unique within its schema.

      +

      The entity container’s name is a simple identifier that MUST be unique among all direct children of its schema.

      Entity containers define the entity sets, singletons, function and action imports exposed by the service.

      Entity set, singleton, action import, and function import names MUST be unique within an entity container.

      An entity set allows access to entity type instances. Simple entity models frequently have one entity set per entity type.

      @@ -1849,7 +1849,7 @@

      14.1 Term

      A term allows annotating a model element or OData resource representation with additional data.

      -

      The term’s name is a simple identifier that MUST be unique within its schema.

      +

      The term’s name is a simple identifier that MUST be unique among all direct children of its schema.

      The term’s type MUST be a type in scope, or a collection of a type in scope.

      Element edm:Term

      diff --git a/docs/odata-csdl-xml/odata-csdl-xml.md b/docs/odata-csdl-xml/odata-csdl-xml.md index cddf70bbc..dc9657236 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.md +++ b/docs/odata-csdl-xml/odata-csdl-xml.md @@ -1187,7 +1187,7 @@ The `edm:Schema` element defines a schema. It MUST contain the `Namespace` attribute and it MAY contain the `Alias` attribute. -It MAY contain elements [`edm:Action`](#Action), +It MAY contain elements representing its direct children: [`edm:Action`](#Action), [`edm:Annotations`](#AnnotationswithExternalTargeting), [`edm:Annotation`](#Annotation), [`edm:ComplexType`](#ComplexType), [`edm:EntityContainer`](#EntityContainer), @@ -1286,7 +1286,7 @@ type is the template for an entity: any uniquely identifiable record such as a customer or order. The entity type's name is a [simple identifier](#SimpleIdentifier) that -MUST be unique within its schema. +MUST be unique among all direct children of its [schema](#Schema). An entity type can define two types of properties. A [structural property](#StructuralProperty) is a named reference to a primitive, @@ -2153,7 +2153,7 @@ independently of an entity type. Complex types allow entity models to group properties into common structures. The complex type's name is a [simple identifier](#SimpleIdentifier) that -MUST be unique within its schema. +MUST be unique among all direct children of its [schema](#Schema). A complex type can define two types of properties. A [structural property](#StructuralProperty) is a named reference to a primitive, @@ -2276,7 +2276,7 @@ non-empty series of related values. Enumeration types expose these related values as members of the enumeration. The enumeration type's name is a [simple identifier](#SimpleIdentifier) -that MUST be unique within its schema. +that MUST be unique among all direct children of its [schema](#Schema). Although enumeration types have an underlying numeric value, the preferred representation for an enumeration value is the member name. @@ -2453,7 +2453,7 @@ types](#PrimitiveTypes) or of the built-in abstract type [`Edm.PrimitiveType`](#BuiltInAbstractTypes). The type definition's name is a [simple identifier](#SimpleIdentifier) -that MUST be unique within its schema. +that MUST be unique among all direct children of its [schema](#Schema). Type definitions can be used wherever a primitive type is used (other than as the underlying type in a new type definition) and are @@ -2542,7 +2542,10 @@ 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. -The action's name is a [simple identifier](#SimpleIdentifier). The name of the action, excepting any [overloads](#ActionOverloads), MUST be unique within its schema. +The action's name is a [simple identifier](#SimpleIdentifier). If two or more +actions within one [schema](#Schema) have the same name, they are called [overloads](#ActionOverloads) 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.) Actions cannot be composed with additional path segments. @@ -2557,7 +2560,8 @@ of the action. ::: {.varxml .rep} ### Element `edm:Action` -The `edm:Action` element MUST contain the `Name` attribute and it MAY +The `edm:Action` element represents an action with unique name or one overload of +an action. It MUST contain the `Name` attribute and it MAY contain the [`IsBound`](#BoundorUnboundActionsorFunctions) and [`EntitySetPath`](#EntitySetPath) attributes. @@ -2574,13 +2578,12 @@ The value of `Name` is the action's name. ### 12.1.1 Action Overloads [Bound](#BoundorUnboundActionsorFunctions) actions support -overloading (multiple actions having the same name within the same -schema) by binding parameter type. The combination of action name and +overloading by binding parameter type. The combination of action name and the binding parameter type MUST be unique within a schema. [Unbound](#BoundorUnboundActionsorFunctions) actions do not support -overloads. The names of all unbound actions MUST be unique within a -schema. +overloading by parameter types. The names of all unbound actions MUST be unique +among all direct children of its schema. An unbound action MAY have the same name as a bound action. @@ -2590,8 +2593,10 @@ 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. -The function's name is a [simple identifier](#SimpleIdentifier). The name of the function, excepting any [overloads](#FunctionOverloads), -MUST be unique within its schema. +The function's name is a [simple identifier](#SimpleIdentifier). If two or more +functions within one [schema](#Schema) have the same name, they are called [overloads](#FunctionOverloads) 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.) Functions MAY be [composable](#ComposableFunction). @@ -2606,7 +2611,8 @@ of the function. ::: {.varxml .rep} ### Element `edm:Function` -The `edm:Function` element MUST contain the `Name` attribute and it MAY +The `edm:Function` element represents a function with unique name or one overload of +a function. It MUST contain the `Name` attribute and it MAY contain the [`IsBound`](#BoundorUnboundActionsorFunctions) and [`EntitySetPath`](#EntitySetPath) attributes. @@ -2623,8 +2629,7 @@ The value of `Name` is the action's name. ### 12.2.1 Function Overloads [Bound](#BoundorUnboundActionsorFunctions) functions support -overloading (multiple functions having the same name within the same -schema) subject to the following rules: +overloading subject to the following rules: - The combination of function name, binding parameter type, and unordered set of non-binding parameter names MUST be unique within a schema. @@ -2844,7 +2849,7 @@ Each metadata document used to describe an OData service MUST define exactly one entity container. The entity container's name is a [simple identifier](#SimpleIdentifier) -that MUST be unique within its schema. +that MUST be unique among all direct children of its [schema](#Schema). Entity containers define the entity sets, singletons, function and action imports exposed by the service. @@ -3382,7 +3387,7 @@ A term allows annotating a model element or OData resource representation with additional data. The term's name is a [simple identifier](#SimpleIdentifier) that MUST be -unique within its schema. +unique among all direct children of its [schema](#Schema). The term's type MUST be a type in scope, or a collection of a type in scope. diff --git a/odata-csdl/12 Action and Function.md b/odata-csdl/12 Action and Function.md index 3508b1c20..b69c82d70 100644 --- a/odata-csdl/12 Action and Function.md +++ b/odata-csdl/12 Action and Function.md @@ -9,9 +9,11 @@ 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. -The action's name is a [simple identifier](#SimpleIdentifier). -The name of the action, excepting any [overloads](#ActionOverloads), -MUST be unique within its schema. +The action's name is a [simple identifier](#SimpleIdentifier). If two or more +actions within one [schema](#Schema) have the same name, they are called +[overloads](#ActionOverloads) 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.) Actions cannot be composed with additional path segments. @@ -25,9 +27,10 @@ of the action. ::: {.varjson .rep} ### ##isec Action Object -An action is represented as a member of the schema object whose name is -the unqualified name of the action and whose value is an array. The -array contains one object per action overload. +An action or action overloads with a common name are represented as a +member of the schema object whose name is the unqualified name of the action +and whose value is an array. The array contains one object per action +overload. The action object MUST contain the member `$Kind` with a string value of `Action`. @@ -42,7 +45,8 @@ It MAY contain the members ::: {.varxml .rep} ### ##isec Element `edm:Action` -The `edm:Action` element MUST contain the `Name` attribute and it MAY +The `edm:Action` element represents an action with unique name or one overload of +an action. It MUST contain the `Name` attribute and it MAY contain the [`IsBound`](#BoundorUnboundActionsorFunctions) and [`EntitySetPath`](#EntitySetPath) attributes. @@ -59,13 +63,12 @@ The value of `Name` is the action's name. ### ##subsubsec Action Overloads [Bound](#BoundorUnboundActionsorFunctions) actions support -overloading (multiple actions having the same name within the same -schema) by binding parameter type. The combination of action name and +overloading by binding parameter type. The combination of action name and the binding parameter type MUST be unique within a schema. [Unbound](#BoundorUnboundActionsorFunctions) actions do not support -overloads. The names of all unbound actions MUST be unique within a -schema. +overloading by parameter types. The names of all unbound actions MUST be unique +among all direct children of its schema. An unbound action MAY have the same name as a bound action. @@ -75,9 +78,11 @@ 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. -The function's name is a [simple identifier](#SimpleIdentifier). -The name of the function, excepting any [overloads](#FunctionOverloads), -MUST be unique within its schema. +The function's name is a [simple identifier](#SimpleIdentifier). If two or more +functions within one [schema](#Schema) have the same name, they are called +[overloads](#FunctionOverloads) 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.) Functions MAY be [composable](#ComposableFunction). @@ -91,9 +96,10 @@ of the function. ::: {.varjson .rep} ### ##isec Function Object -A function is represented as a member of the schema object whose name is -the unqualified name of the function and whose value is an array. The -array contains one object per function overload. +A function or function overloads with a common name are represented as a +member of the schema object whose name is the unqualified name of the function +and whose value is an array. The array contains one object per function +overload. The function object MUST contain the member `$Kind` with a string value of `Function`. @@ -107,7 +113,8 @@ and it MAY contain [annotations](#Annotation). ::: {.varxml .rep} ### ##isec Element `edm:Function` -The `edm:Function` element MUST contain the `Name` attribute and it MAY +The `edm:Function` element represents a function with unique name or one overload of +a function. It MUST contain the `Name` attribute and it MAY contain the [`IsBound`](#BoundorUnboundActionsorFunctions) and [`EntitySetPath`](#EntitySetPath) attributes. @@ -124,8 +131,7 @@ The value of `Name` is the action's name. ### ##subsubsec Function Overloads [Bound](#BoundorUnboundActionsorFunctions) functions support -overloading (multiple functions having the same name within the same -schema) subject to the following rules: +overloading subject to the following rules: - The combination of function name, binding parameter type, and unordered set of non-binding parameter names MUST be unique within a schema. diff --git a/odata-csdl/13 Entity Container.md b/odata-csdl/13 Entity Container.md index ed30ac029..880f41956 100644 --- a/odata-csdl/13 Entity Container.md +++ b/odata-csdl/13 Entity Container.md @@ -7,7 +7,7 @@ Each metadata document used to describe an OData service MUST define exactly one entity container. The entity container's name is a [simple identifier](#SimpleIdentifier) -that MUST be unique within its schema. +that MUST be unique among all direct children of its [schema](#Schema). Entity containers define the entity sets, singletons, function and action imports exposed by the service. diff --git a/odata-csdl/14 Vocabulary and Annotation.md b/odata-csdl/14 Vocabulary and Annotation.md index 3e2461367..d09c1175a 100644 --- a/odata-csdl/14 Vocabulary and Annotation.md +++ b/odata-csdl/14 Vocabulary and Annotation.md @@ -143,7 +143,7 @@ A term allows annotating a model element or OData resource representation with additional data. The term's name is a [simple identifier](#SimpleIdentifier) that MUST be -unique within its schema. +unique among all direct children of its [schema](#Schema). The term's type MUST be a type in scope, or a collection of a type in scope. diff --git a/odata-csdl/5 Schema.md b/odata-csdl/5 Schema.md index 6bbb72684..e6063bebf 100644 --- a/odata-csdl/5 Schema.md +++ b/odata-csdl/5 Schema.md @@ -33,7 +33,7 @@ the schema namespace. Its value is an object that MAY contain the members [`$Alias`](#Alias) and [`$Annotations`](#AnnotationswithExternalTargeting). -The schema object MAY contain members representing [entity +The schema object MAY contain members representing its direct children: [entity types](#EntityType), [complex types](#ComplexType), [enumeration types](#EnumerationType), [type definitions](#TypeDefinition), [actions](#Action), [functions](#Function), [terms](#Term), and an @@ -50,7 +50,7 @@ The `edm:Schema` element defines a schema. It MUST contain the `Namespace` attribute and it MAY contain the `Alias` attribute. -It MAY contain elements [`edm:Action`](#Action), +It MAY contain elements representing its direct children: [`edm:Action`](#Action), [`edm:Annotations`](#AnnotationswithExternalTargeting), [`edm:Annotation`](#Annotation), [`edm:ComplexType`](#ComplexType), [`edm:EntityContainer`](#EntityContainer), @@ -200,7 +200,7 @@ type is the template for an entity: any uniquely identifiable record such as a customer or order. The entity type's name is a [simple identifier](#SimpleIdentifier) that -MUST be unique within its schema. +MUST be unique among all direct children of its [schema](#Schema). An entity type can define two types of properties. A [structural property](#StructuralProperty) is a named reference to a primitive, diff --git a/odata-csdl/9 Complex Type.md b/odata-csdl/9 Complex Type.md index 6f553fc10..08e33f3aa 100644 --- a/odata-csdl/9 Complex Type.md +++ b/odata-csdl/9 Complex Type.md @@ -10,7 +10,7 @@ independently of an entity type. Complex types allow entity models to group properties into common structures. The complex type's name is a [simple identifier](#SimpleIdentifier) that -MUST be unique within its schema. +MUST be unique among all direct children of its [schema](#Schema). A complex type can define two types of properties. A [structural property](#StructuralProperty) is a named reference to a primitive, @@ -203,7 +203,7 @@ non-empty series of related values. Enumeration types expose these related values as members of the enumeration. The enumeration type's name is a [simple identifier](#SimpleIdentifier) -that MUST be unique within its schema. +that MUST be unique among all direct children of its [schema](#Schema). Although enumeration types have an underlying numeric value, the preferred representation for an enumeration value is the member name. @@ -477,7 +477,7 @@ types](#PrimitiveTypes) or of the built-in abstract type [`Edm.PrimitiveType`](#BuiltInAbstractTypes). The type definition's name is a [simple identifier](#SimpleIdentifier) -that MUST be unique within its schema. +that MUST be unique among all direct children of its [schema](#Schema). Type definitions can be used wherever a primitive type is used (other than as the underlying type in a new type definition) and are From dfb4b2eddc32dc34935553716f14da4f2b582b2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Heiko=20Thei=C3=9Fen?= Date: Thu, 8 Feb 2024 09:24:45 +0100 Subject: [PATCH 2/2] Improve structure of Appendix B --- docs/odata-csdl-json/odata-csdl-json.html | 227 +++++++++++----------- docs/odata-csdl-json/odata-csdl-json.md | 221 +++++++++++---------- odata-csdl/12 Action and Function.md | 7 +- 3 files changed, 238 insertions(+), 217 deletions(-) diff --git a/docs/odata-csdl-json/odata-csdl-json.html b/docs/odata-csdl-json/odata-csdl-json.html index d63be05bb..42edeeced 100644 --- a/docs/odata-csdl-json/odata-csdl-json.html +++ b/docs/odata-csdl-json/odata-csdl-json.html @@ -1696,13 +1696,15 @@

      12.4 Return Typ

      For a single-valued return type the facets apply to the returned value. For a collection-valued return type the facets apply to the items in the returned collection.

      $ReturnType

      -

      The value of $ReturnType is an object. It MAY contain the members $Type, $Collection, $Nullable, $MaxLength, $Unicode, $Precision, $Scale, and $SRID.

      +

      The value of $ReturnType is an object.

      +

      Return Type Object

      +

      The return type object MAY contain the members $Type, $Collection, $Nullable, $MaxLength, $Unicode, $Precision, $Scale, and $SRID.

      It also MAY contain annotations.

      -

      $Type and $Collection

      +

      $Type and $Collection

      For single-valued return types the value of $Type is the qualified name of the returned type.

      For collection-valued return types the value of $Type is the qualified name of the returned item type, and the member $Collection MUST be present with the literal value true.

      Absence of the $Type member means the type is Edm.String.

      -

      $Nullable

      +

      $Nullable

      The value of $Nullable is one of the Boolean literals true or false. Absence of the member means false.

      If the return type is a collection of entity types, the $Nullable member has no meaning and MUST NOT be specified.

      For other collection-valued return types the result will always be a collection that MAY be empty. In this case $Nullable applies to items of the collection and specifies whether the collection MAY contain null values.

      @@ -1716,18 +1718,19 @@

      12.5 Parameter<

      The facets MaxLength, Precision, Scale, or SRID can be used as appropriate to specify value restrictions of the parameter, as well as the Unicode facet for 4.01 and greater payloads.

      For single-valued parameters the facets apply to the parameter value. If the parameter value is a collection, the facets apply to the items in the collection.

      -

      $Parameter

      +

      Parameters in Action and Function Object

      +

      $Parameter

      The value of $Parameter is an array. The array contains one object per parameter.

      -

      Parameter Object

      +

      Parameter Object

      A parameter object MUST contain the member $Name, and it MAY contain the members $Type, $Collection, $Nullable, $MaxLength, $Unicode, $Precision, $Scale, and $SRID.

      Parameter objects MAY also contain annotations.

      -

      $Name

      +

      $Name

      The value of $Name is a string containing the parameter name.

      -

      $Type and $Collection

      +

      $Type and $Collection

      For single-valued parameters the value of $Type is the qualified name of the accepted type.

      For collection-valued parameters the value of $Type is the qualified name of the accepted item type, and the member $Collection MUST be present with the literal value true.

      Absence of the $Type member means the type is Edm.String.

      -

      $Nullable

      +

      $Nullable

      The value of $Nullable is one of the Boolean literals true or false. Absence of the member means false.

      For single-valued parameters the value true means that the parameter accepts a null value.

      For collection-valued parameters the parameter value will always be a collection that MAY be empty. In this case $Nullable applies to items of the collection and specifies whether the collection MAY contain null values.

      @@ -1798,7 +1801,7 @@

      1

      A singleton allows addressing a single entity directly from the entity container without having to know its key, and without requiring an entity set.

      A function import or an action import is used to expose a function or action defined in an entity model as a top level resource.

      -

      Entity Container Object

      +

      Entity Container Object

      An entity container is represented as a member of the schema object whose name is the unqualified name of the entity container and whose value is an object.

      The entity container object MUST contain the member $Kind with a string value of EntityContainer.

      The entity container object MAY contain the member $Extends, members representing entity sets, singletons, action imports, and function imports, as well as annotations.

      @@ -1848,7 +1851,7 @@

      If the “extending” entity container defines an entity set with the same name as defined in any of its “base” containers, then the entity set’s type MUST specify an entity type derived from the entity type specified for the identically named entity set in the “base” container. The same holds for singletons. Action imports and function imports cannot be redefined, nor can the “extending” container define a child with the same name as a child of a different kind in a “base” container.

      Note: services should not introduce cycles by extending entity containers. Clients should be prepared to process cycles introduced by extending entity containers.

      -

      $Extends

      +

      $Extends

      The value of $Extends is the qualified name of the entity container to be extended.

      @@ -1867,15 +1870,15 @@

      13.2 Entity SetAn entity set MAY indicate whether it is included in the service document. If not explicitly indicated, it is included.

      Entity sets that cannot be queried without specifying additional query options SHOULD NOT be included in the service document.

      -

      Entity Set Object

      +

      Entity Set Object

      An entity set is represented as a member of the entity container object whose name is the name of the entity set and whose value is an object.

      The entity set object MUST contain the members $Collection and $Type.

      It MAY contain the members $IncludeInServiceDocument and $NavigationPropertyBinding as well as annotations.

      -

      $Collection

      +

      $Collection

      The value of $Collection is the Boolean value true.

      -

      $Type

      +

      $Type

      The value of $Type is the qualified name of an entity type.

      -

      $IncludeInServiceDocument

      +

      $IncludeInServiceDocument

      The value of $IncludeInServiceDocument is one of the Boolean literals true or false. Absence of the member means true.

      13.3 Singleton

      @@ -1884,13 +1887,13 @@

      13.3 Singleton<

      A singleton MUST specify a type that MUST be an entity type in scope.

      A singleton MUST reference an instance its entity type.

      -

      Singleton Object

      +

      Singleton Object

      A singleton is represented as a member of the entity container object whose name is the name of the singleton and whose value is an object.

      The singleton object MUST contain the member $Type and it MAY contain the member $Nullable.

      It MAY contain the member $NavigationPropertyBinding as well as annotations.

      -

      $Type

      +

      $Type

      The value of $Type is the qualified name of an entity type.

      -

      $Nullable

      +

      $Nullable

      The value of $Nullable is one of the Boolean literals true or false. Absence of the member means false.In OData 4.0 responses this member MUST NOT be specified.

      13.4 Navigation Property Binding

      @@ -1909,7 +1912,7 @@

      13.4.

      If the target is a simple identifier, it MUST resolve to an entity set or singleton defined in the same entity container.

      If the target is a target path, it MUST resolve to an entity set, singleton, or direct or indirect containment navigation property of a singleton in scope. The path can traverse single-valued containment navigation properties or single-valued complex properties before ending in a containment navigation property, and there MUST NOT be any non-containment navigation properties prior to the final segment.

      @@ -1948,14 +1951,14 @@

      13.5 Acti

      An action import MUST specify the name of an unbound action in scope.

      If the imported action returns an entity or a collection of entities, a simple identifier or target path value MAY be specified to identify the entity set that contains the returned entities. If a simple identifier is specified, it MUST resolve to an entity set defined in the same entity container. If a target path is specified, it MUST resolve to an entity set in scope.

      -

      Action Import Object

      +

      Action Import Object

      An action import is represented as a member of the entity container object whose name is the name of the action import and whose value is an object.

      The action import object MUST contain the member $Action.

      It MAY contain the member $EntitySet.

      It MAY also contain annotations.

      -

      $Action

      +

      $Action

      The value of $Action is a string containing the qualified name of an unbound action.

      -

      $EntitySet

      +

      $EntitySet

      The value of $EntitySet is a string containing either the unqualified name of an entity set in the same entity container or a path to an entity set in a different entity container.

      13.6 Function Import

      @@ -1965,16 +1968,16 @@

      13.

      If the imported function returns an entity or a collection of entities, a simple identifier or target path value MAY be specified to identify the entity set that contains the returned entities. If a simple identifier is specified, it MUST resolve to an entity set defined in the same entity container. If a target path is specified, it MUST resolve to an entity set in scope.

      A function import for a parameterless function MAY indicate whether it is included in the service document. If not explicitly indicated, it is not included.

      -

      Function Import Object

      +

      Function Import Object

      A function import is represented as a member of the entity container object whose name is the name of the function import and whose value is an object.

      The function import object MUST contain the member $Function.

      It MAY contain the members $EntitySet and $IncludeInServiceDocument.

      It MAY also contain annotations.

      -

      $Function

      +

      $Function

      The value of $Function is a string containing the qualified name of an unbound function.

      -

      $EntitySet

      +

      $EntitySet

      The value of $EntitySet is a string containing either the unqualified name of an entity set in the same entity container or a path to an entity set in a different entity container.

      -

      $IncludeInServiceDocument

      +

      $IncludeInServiceDocument

      The value of $IncludeInServiceDocument is one of the Boolean literals true or false. Absence of the member means false.


      @@ -2038,20 +2041,20 @@

      14.1 Term

      The term’s name is a simple identifier that MUST be unique among all direct children of its schema.

      The term’s type MUST be a type in scope, or a collection of a type in scope.

      -

      Term Object

      +

      Term Object

      A term is represented as a member of the schema object whose name is the unqualified name of the term and whose value is an object.

      The term object MUST contain the member $Kind with a string value of Term.

      It MAY contain the members $Type, $Collection, $Nullable, $DefaultValue, $BaseTerm, $AppliesTo, $MaxLength, $Precision, $Scale, and $SRID, as well as $Unicode for 4.01 and greater payloads.

      It MAY contain annotations.

      -

      $Type and $Collection

      +

      $Type and $Collection

      For single-valued terms the value of $Type is the qualified name of the term’s type.

      For collection-valued terms the value of $Type is the qualified name of the term’s item type, and the member $Collection MUST be present with the literal value true.

      Absence of the $Type member means the type is Edm.String.

      -

      $Nullable

      +

      $Nullable

      The value of $Nullable is one of the Boolean literals true or false. Absence of the member means false.

      For single-valued terms the value true means that annotations may have the null value.

      For collection-valued terms the annotation value will always be a collection that MAY be empty. In this case $Nullable applies to items of the collection and specifies whether the collection MAY contain null values.

      -

      $DefaultValue

      +

      $DefaultValue

      The value of $DefaultValue is the type-specific JSON representation of the default value of the term, see OData-JSON.

      Note: the $DefaultValue member is purely for documentation and isomorphy to OData-CSDLXML. Annotations in CSDL JSON documents MUST always specify an explicit value.

      @@ -2059,7 +2062,7 @@

      A term MAY specialize another term in scope by specifying it as its base term.

      When applying a specialized term, the base term MUST also be applied with the same qualifier, and so on until a term without a base term is reached.

      -

      $BaseTerm

      +

      $BaseTerm

      The value of $BaseTerm is the qualified name of the base term.

      14.1.2 Applicability

      @@ -2207,7 +2210,7 @@

      14.1.2
      -

      $AppliesTo

      +

      $AppliesTo

      The value of $AppliesTo is an array whose items are strings containing symbolic values from the table above that identify model elements the term is intended to be applied to.

      @@ -2228,7 +2231,7 @@

      14.2 Annotation<

      An annotation applies a term to a model element and defines how to calculate a value for the term application. Both term and model element MUST be in scope. Section 14.1.2 specifies which model elements MAY be annotated with a term.

      The value of an annotation is specified as an annotation expression, which is either a constant expression representing a constant value, or a dynamic expression. The most common construct for assigning an annotation value is a path expression that refers to a property of the same or a related structured type.

      -

      Annotation Member

      +

      Annotation Member

      An annotation is represented as a member whose name consists of an at (@) character, followed by the qualified name of a term, optionally followed by a hash (#) and a qualifier.

      The value of the annotation MUST be a constant expression or dynamic expression.

      The annotation can be a member of the object representing the model element it annotates, or a second-level member of the $Annotations member of a schema object.

      @@ -2736,7 +2739,7 @@

      14.4.1.7 Value P

      The value path expression allows assigning a value by traversing an object graph. It can be used in annotations that target entity containers, entity sets, entity types, complex types, navigation properties of structured types, and structural properties of structured types. Its argument is an instance path.

      The value of the path expression is the instance or collection of instances identified by the path.

      -

      $Path

      +

      $Path

      Path expressions are represented as an object with a single member $Path whose value is a string containing a path.

      @@ -2770,13 +2773,13 @@

      OData-URL.

      The other comparison operators require two operand expressions that evaluate to comparable values.

      -

      $And and $Or

      +

      $And and $Or

      The And and Or logical expressions are represented as an object with a single member whose value is an array with two annotation expressions. The member name is one of $And, or $Or.

      It MAY contain annotations.

      -

      $Not

      +

      $Not

      Negation expressions are represented as an object with a single member $Not whose value is an annotation expression.

      It MAY contain annotations.

      -

      $Eq, $Ne, $Gt, $Ge, $Lt, $Le, $Has, and $In

      +

      $Eq, $Ne, $Gt, $Ge, $Lt, $Le, $Has, and $In

      All comparison expressions are represented as an object with a single member whose value is an array with two annotation expressions. The member name is one of $Eq, $Ne, $Gt, $Ge, $Lt, $Le, $Has, or $In.

      They MAY contain annotations.

      @@ -2917,10 +2920,10 @@

      -

      $Neg

      +

      $Neg

      Negation expressions are represented as an object with a single member $Neg whose value is an annotation expression.

      It MAY contain annotations.

      -

      $Add, $Sub, $Mul, $Div, $DivBy, and $Mod

      +

      $Add, $Sub, $Mul, $Div, $DivBy, and $Mod

      These arithmetic expressions are represented as an object with as single member whose value is an array with two annotation expressions. The member name is one of $Add, $Sub, $Neg, $Mul, $Div, $DivBy, or $Mod.

      They MAY contain annotations.

      @@ -2995,7 +2998,7 @@

      14.4.4 Apply Client-Side Functions

      The apply expression enables a value to be obtained by applying a client-side function. The apply expression MAY have operand expressions. The operand expressions are used as parameters to the client-side function.

      -

      $Apply and $Function

      +

      $Apply and $Function

      Apply expressions are represented as an object with a member $Apply whose value is an array of annotation expressions, and a member $Function whose value is a string containing the qualified name of the client-side function to be applied.

      It MAY contain annotations.

      @@ -3113,7 +3116,7 @@

      14.4.5 Cast

      The cast expression casts the value obtained from its single child expression to the specified type. The cast expression follows the same rules as the cast canonical function defined in OData-URL.

      -

      $Cast

      +

      $Cast

      Cast expressions are represented as an object with a member $Cast whose value is an annotation expression, a member $Type whose value is a string containing the qualified type name, and optionally a member $Collection with a value of true.

      It MAY contain annotations.

      If the specified type is a primitive type or a collection of primitive types, the facet members $MaxLength, $Unicode, $Precision, $Scale, and $SRID MAY be specified if applicable to the specified primitive type. If the facet members are not specified, their values are considered unspecified.

      @@ -3146,7 +3149,7 @@

      14.4.7 If-The

      The second and third child expressions are evaluated conditionally. The result MUST be type compatible with the type expected by the surrounding expression.

      If the first expression evaluates to true, the second expression MUST be evaluated and its value MUST be returned as the result of the if-then-else expression. If the first expression evaluates to false and a third child element is present, it MUST be evaluated and its value MUST be returned as the result of the if-then-else expression. If no third expression is present, nothing is added to the surrounding collection.

      -

      $If

      +

      $If

      Conditional expressions are represented as an object with a member $If whose value is an array of two or three annotation expressions.

      It MAY contain annotations.

      @@ -3165,7 +3168,7 @@

      $If

      14.4.8 Is-Of

      The is-of expression checks whether the value obtained from its single child expression is compatible with the specified type. It returns true if the child expression returns a type that is compatible with the specified type, and false otherwise.

      -

      $IsOf

      +

      $IsOf

      Is-of expressions are represented as an object with a member $IsOf whose value is an annotation expression, a member $Type whose value is a string containing an qualified type name, and optionally a member $Collection with a value of true.

      It MAY contain annotations.

      If the specified type is a primitive type or a collection of primitive types, the facet members $MaxLength, $Unicode, $Precision, $Scale, and $SRID MAY be specified if applicable to the specified primitive type. If the facet members are not specified, their values are considered unspecified.

      @@ -3184,7 +3187,7 @@

      14

      A labeled element expression MUST contain exactly one child expression. The value of the child expression is also the value of the labeled element expression.

      A labeled element expression MUST provide a simple identifier value as its name that MUST be unique within the schema containing the expression.

      -

      $LabeledElement

      +

      $LabeledElement

      Labeled element expressions are represented as an object with a member $LabeledElement whose value is an annotation expression, and a member $Name whose value is a string containing the labeled element’s name.

      It MAY contain annotations.

      @@ -3200,7 +3203,7 @@

      $LabeledEl

      14.4.10 Labeled Element Reference

      The labeled element reference expression MUST specify the qualified name of a labeled element expression in scope and returns the value of the identified labeled element expression as its value.

      -

      $LabeledElementReference

      +

      $LabeledElementReference

      Labeled element reference expressions are represented as an object with a member $LabeledElementReference whose value is a string containing an qualified name.

      @@ -3219,7 +3222,7 @@

      14.4.11 Null

      "@UI.DisplayName": null,
      -

      $Null

      +

      $Null

      Null expression containing annotations are represented as an object with a member $Null whose value is the literal null.

    -
  • Parameter Object +
  • Return Type Object
  • -
  • Entity Container Object +
  • Parameters in Action and Function Object
  • -
  • Entity Set Object +
  • Parameter Object
  • -
  • Singleton Object +
  • Entity Container Object
  • -
  • Action Import Object +
  • Entity Set Object
  • -
  • Function Import Object +
  • Singleton Object
  • -
  • Term Object -
  • diff --git a/docs/odata-csdl-json/odata-csdl-json.md b/docs/odata-csdl-json/odata-csdl-json.md index 888714a0b..7d2ac54c5 100644 --- a/docs/odata-csdl-json/odata-csdl-json.md +++ b/docs/odata-csdl-json/odata-csdl-json.md @@ -2855,14 +2855,18 @@ returned collection. ::: {.varjson .rep} ### `$ReturnType` -The value of `$ReturnType` is an object. It MAY contain the members +The value of `$ReturnType` is an object. + +### Return Type Object + +The return type object MAY contain the members `$Type`, `$Collection`, `$Nullable`, [`$MaxLength`](#MaxLength), [`$Unicode`](#Unicode), [`$Precision`](#Precision), [`$Scale`](#Scale), and [`$SRID`](#SRID). It also MAY contain [annotations](#Annotation). -### `$Type` and `$Collection` +### `$Type` and `$Collection` For single-valued return types the value of `$Type` is the qualified name of the returned type. @@ -2873,7 +2877,7 @@ present with the literal value `true`. Absence of the `$Type` member means the type is `Edm.String`. -### `$Nullable` +### `$Nullable` The value of `$Nullable` is one of the Boolean literals `true` or `false`. Absence of the member means `false`. @@ -2918,12 +2922,13 @@ the parameter value is a collection, the facets apply to the items in the collection. ::: {.varjson .rep} -### `$Parameter` +### Parameters in Action and Function Object +### `$Parameter` The value of `$Parameter` is an array. The array contains one object per parameter. -### Parameter Object +### Parameter Object A parameter object MUST contain the member `$Name`, and it MAY contain the members `$Type`, `$Collection`, `$Nullable`, @@ -2932,11 +2937,11 @@ the members `$Type`, `$Collection`, `$Nullable`, Parameter objects MAY also contain [annotations](#Annotation). -### `$Name` +### `$Name` The value of `$Name` is a string containing the parameter name. -### `$Type` and `$Collection` +### `$Type` and `$Collection` For single-valued parameters the value of `$Type` is the qualified name of the accepted type. @@ -2947,7 +2952,7 @@ present with the literal value `true`. Absence of the `$Type` member means the type is `Edm.String`. -### `$Nullable` +### `$Nullable` The value of `$Nullable` is one of the Boolean literals `true` or `false`. Absence of the member means `false`. @@ -3071,7 +3076,7 @@ import*](#ActionImport) is used to expose a function or action defined in an entity model as a top level resource. ::: {.varjson .rep} -### Entity Container Object +### Entity Container Object An entity container is represented as a member of the schema object whose name is the unqualified name of the entity container and whose @@ -3152,7 +3157,7 @@ containers. Clients should be prepared to process cycles introduced by extending entity containers. ::: {.varjson .rep} -### `$Extends` +### `$Extends` The value of `$Extends` is the qualified name of the entity container to be extended. @@ -3194,7 +3199,7 @@ Entity sets that cannot be queried without specifying additional query options SHOULD NOT be included in the service document. ::: {.varjson .rep} -### Entity Set Object +### Entity Set Object An entity set is represented as a member of the entity container object whose name is the name of the entity set and whose value is an object. @@ -3206,15 +3211,15 @@ It MAY contain the members `$IncludeInServiceDocument` and [`$NavigationPropertyBinding`](#NavigationPropertyBinding) as well as [annotations](#Annotation). -### `$Collection` +### `$Collection` The value of `$Collection` is the Boolean value `true`. -### `$Type` +### `$Type` The value of `$Type` is the qualified name of an entity type. -### `$IncludeInServiceDocument` +### `$IncludeInServiceDocument` The value of `$IncludeInServiceDocument` is one of the Boolean literals `true` or `false`. Absence of the member means `true`. @@ -3234,7 +3239,7 @@ A singleton MUST specify a type that MUST be an entity type in scope. A singleton MUST reference an instance its entity type. ::: {.varjson .rep} -### Singleton Object +### Singleton Object A singleton is represented as a member of the entity container object whose name is the name of the singleton and whose value is an object. @@ -3246,11 +3251,11 @@ It MAY contain the member [`$NavigationPropertyBinding`](#NavigationPropertyBinding) as well as [annotations](#Annotation). -### `$Type` +### `$Type` The value of `$Type` is the qualified name of an entity type. -### `$Nullable` +### `$Nullable` The value of `$Nullable` is one of the Boolean literals `true` or `false`. Absence of the member means `false`.In OData 4.0 responses this @@ -3330,7 +3335,7 @@ before ending in a containment navigation property, and there MUST NOT be any non-containment navigation properties prior to the final segment. ::: {.varjson .rep} -### `$NavigationPropertyBinding` +### `$NavigationPropertyBinding` The value of `$NavigationPropertyBinding` is an object. It consists of members whose name is the navigation property binding path and whose @@ -3404,7 +3409,7 @@ container. If a [target path](#TargetPath) is specified, it MUST resolve to an entity set in scope. ::: {.varjson .rep} -### Action Import Object +### Action Import Object An action import is represented as a member of the entity container object whose name is the name of the action import and whose value is an @@ -3416,12 +3421,12 @@ It MAY contain the member `$EntitySet`. It MAY also contain [annotations](#Annotation). -### `$Action` +### `$Action` The value of `$Action` is a string containing the qualified name of an unbound action. -### `$EntitySet` +### `$EntitySet` The value of `$EntitySet` is a string containing either the unqualified name of an entity set in the same entity container or a path to an @@ -3454,7 +3459,7 @@ is included in the service document. If not explicitly indicated, it is not included. ::: {.varjson .rep} -### Function Import Object +### Function Import Object A function import is represented as a member of the entity container object whose name is the name of the function import and whose value is @@ -3466,18 +3471,18 @@ It MAY contain the members `$EntitySet` and `$IncludeInServiceDocument`. It MAY also contain [annotations](#Annotation). -### `$Function` +### `$Function` The value of `$Function` is a string containing the qualified name of an unbound function. -### `$EntitySet` +### `$EntitySet` The value of `$EntitySet` is a string containing either the unqualified name of an entity set in the same entity container or a path to an entity set in a different entity container. -### `$IncludeInServiceDocument` +### `$IncludeInServiceDocument` The value of `$IncludeInServiceDocument` is one of the Boolean literals `true` or `false`. Absence of the member means `false`. @@ -3601,7 +3606,7 @@ The term's type MUST be a type in scope, or a collection of a type in scope. ::: {.varjson .rep} -### Term Object +### Term Object A term is represented as a member of the schema object whose name is the unqualified name of the term and whose value is an object. @@ -3618,7 +3623,7 @@ It MAY contain the members `$Type`, `$Collection`, `$Nullable`, `$DefaultValue`, It MAY contain [annotations](#Annotation). -### `$Type` and `$Collection` +### `$Type` and `$Collection` For single-valued terms the value of `$Type` is the qualified name of the term's type. @@ -3629,7 +3634,7 @@ with the literal value `true`. Absence of the `$Type` member means the type is `Edm.String`. -### `$Nullable` +### `$Nullable` The value of `$Nullable` is one of the Boolean literals `true` or `false`. Absence of the member means `false`. @@ -3642,7 +3647,7 @@ collection that MAY be empty. In this case `$Nullable` applies to items of the collection and specifies whether the collection MAY contain `null` values. -### `$DefaultValue` +### `$DefaultValue` The value of `$DefaultValue` is the type-specific JSON representation of the default value of the term, see @@ -3664,7 +3669,7 @@ with the same qualifier, and so on until a term without a base term is reached. ::: {.varjson .rep} -### `$BaseTerm` +### `$BaseTerm` The value of `$BaseTerm` is the qualified name of the base term. ::: @@ -3717,7 +3722,7 @@ Symbolic Value|Model Element `UrlRef` |UrlRef annotation expression ::: {.varjson .rep} -### `$AppliesTo` +### `$AppliesTo` The value of `$AppliesTo` is an array whose items are strings containing symbolic values from the table above that identify model elements the @@ -3760,7 +3765,7 @@ an annotation value is a [path expression](#ValuePath) that refers to a property of the same or a related structured type. ::: {.varjson .rep} -### Annotation Member +### Annotation Member An annotation is represented as a member whose name consists of an at (`@`) character, followed by the qualified name of a term, optionally @@ -4643,7 +4648,7 @@ The value of the path expression is the instance or collection of instances identified by the path. ::: {.varjson .rep} -### `$Path` +### `$Path` Path expressions are represented as an object with a single member `$Path` whose value is a string containing a path. @@ -4695,7 +4700,7 @@ The other comparison operators require two operand expressions that evaluate to comparable values. ::: {.varjson .rep} -### `$And` and `$Or` +### `$And` and `$Or` The `And` and `Or` logical expressions are represented as an object with a single member whose value is an array with two annotation expressions. @@ -4703,14 +4708,14 @@ The member name is one of `$And`, or `$Or`. It MAY contain [annotations](#Annotation). -### `$Not` +### `$Not` Negation expressions are represented as an object with a single member `$Not` whose value is an annotation expression. It MAY contain [annotations](#Annotation). -### `$Eq`, `$Ne`, `$Gt`, `$Ge`, `$Lt`, `$Le`, `$Has`, and `$In` +### `$Eq`, `$Ne`, `$Gt`, `$Ge`, `$Lt`, `$Le`, `$Has`, and `$In` All comparison expressions are represented as an object with a single member whose value is an array with two annotation expressions. The @@ -4844,14 +4849,14 @@ to a numeric value. The other arithmetic operators require two operand expressions that evaluate to numeric values. ::: {.varjson .rep} -### `$Neg` +### `$Neg` Negation expressions are represented as an object with a single member `$Neg` whose value is an annotation expression. It MAY contain [annotations](#Annotation). -### `$Add`, `$Sub`, `$Mul`, `$Div`, `$DivBy`, and `$Mod` +### `$Add`, `$Sub`, `$Mul`, `$Div`, `$DivBy`, and `$Mod` These arithmetic expressions are represented as an object with as single member whose value is an array with two annotation expressions. The @@ -4942,7 +4947,7 @@ The operand expressions are used as parameters to the client-side function. ::: {.varjson .rep} -### `$Apply` and `$Function` +### `$Apply` and `$Function` Apply expressions are represented as an object with a member `$Apply` whose value is an array of annotation expressions, and a member @@ -5148,7 +5153,7 @@ rules as the `cast` canonical function defined in [OData-URL](#ODataURL). ::: {.varjson .rep} -### `$Cast` +### `$Cast` Cast expressions are represented as an object with a member `$Cast` whose value is an annotation expression, a member `$Type` whose value is @@ -5231,7 +5236,7 @@ third expression is present, nothing is added to the surrounding collection. ::: {.varjson .rep} -### `$If` +### `$If` Conditional expressions are represented as an object with a member `$If` whose value is an array of two or three annotation expressions. @@ -5266,7 +5271,7 @@ child expression is compatible with the specified type. It returns the specified type, and `false` otherwise. ::: {.varjson .rep} -### `$IsOf` +### `$IsOf` Is-of expressions are represented as an object with a member `$IsOf` whose value is an annotation expression, a member `$Type` whose value is @@ -5313,7 +5318,7 @@ identifier](#SimpleIdentifier) value as its name that MUST be unique within the schema containing the expression. ::: {.varjson .rep} -### `$LabeledElement` +### `$LabeledElement` Labeled element expressions are represented as an object with a member `$LabeledElement` whose value is an annotation expression, and a member @@ -5344,7 +5349,7 @@ in scope and returns the value of the identified labeled element expression as its value. ::: {.varjson .rep} -### `$LabeledElementReference` +### `$LabeledElementReference` Labeled element reference expressions are represented as an object with a member `$LabeledElementReference` whose value is a string containing @@ -5380,7 +5385,7 @@ Example 85: ::: ::: {.varjson .rep} -### `$Null` +### `$Null` Null expression containing [annotations](#Annotations) are represented as an object with a member `$Null` whose value is the literal `null`. @@ -5495,7 +5500,7 @@ expression MUST be type compatible with the type expected by the surrounding expression. ::: {.varjson .rep} -### `$UrlRef` +### `$UrlRef` URL reference expressions are represented as an object with a single member `$UrlRef` whose value is an annotation expression. @@ -6097,68 +6102,70 @@ https://openui5.hana.ondemand.com/1.40.10/#docs/guide/87aac894a40640f89920d7b2a4 - [`$IsBound`](#IsBound.13.2) - [`$EntitySetPath`](#EntitySetPath.13.3) - [`$ReturnType`](#ReturnType.13.4) - - [`$Type`](#Type.13.5) - - [`$Collection`](#Collection.13.6) - - [`$Nullable`](#Nullable.13.7) - - [`$Parameter`](#Parameter.13.8) -- [Parameter Object](#ParameterObject.14) - - [`$Name`](#Name.14.1) - - [`$Type`](#Type.14.2) - - [`$Collection`](#Collection.14.3) - - [`$Nullable`](#Nullable.14.4) -- [Entity Container Object](#EntityContainerObject.15) - - [`$Extends`](#Extends.15.1) -- [Entity Set Object](#EntitySetObject.16) - - [`$Collection`](#Collection.16.1) +- [Return Type Object](#ReturnTypeObject.14) + - [`$Type`](#Type.14.1) + - [`$Collection`](#Collection.14.2) + - [`$Nullable`](#Nullable.14.3) +- [Parameters in Action and Function Object](#ParametersinActionandFunctionObject.15) + - [`$Parameter`](#Parameter.15.1) +- [Parameter Object](#ParameterObject.16) + - [`$Name`](#Name.16.1) - [`$Type`](#Type.16.2) - - [`$IncludeInServiceDocument`](#IncludeInServiceDocument.16.3) -- [Singleton Object](#SingletonObject.17) - - [`$Type`](#Type.17.1) - - [`$Nullable`](#Nullable.17.2) - - [`$NavigationPropertyBinding`](#NavigationPropertyBinding.17.3) -- [Action Import Object](#ActionImportObject.18) - - [`$Action`](#Action.18.1) - - [`$EntitySet`](#EntitySet.18.2) -- [Function Import Object](#FunctionImportObject.19) - - [`$Function`](#Function.19.1) - - [`$EntitySet`](#EntitySet.19.2) - - [`$IncludeInServiceDocument`](#IncludeInServiceDocument.19.3) -- [Term Object](#TermObject.20) - - [`$Type`](#Type.20.1) - - [`$Collection`](#Collection.20.2) - - [`$Nullable`](#Nullable.20.3) - - [`$DefaultValue`](#DefaultValue.20.4) - - [`$BaseTerm`](#BaseTerm.20.5) - - [`$AppliesTo`](#AppliesTo.20.6) -- [Annotation Member](#AnnotationMember.21) - - [`$Path`](#Path.21.1) - - [`$And`](#And.21.2) - - [`$Or`](#Or.21.3) - - [`$Not`](#Not.21.4) - - [`$Eq`](#Eq.21.5) - - [`$Ne`](#Ne.21.6) - - [`$Gt`](#Gt.21.7) - - [`$Ge`](#Ge.21.8) - - [`$Lt`](#Lt.21.9) - - [`$Le`](#Le.21.10) - - [`$Has`](#Has.21.11) - - [`$In`](#In.21.12) - - [`$Neg`](#Neg.21.13) - - [`$Add`](#Add.21.14) - - [`$Sub`](#Sub.21.15) - - [`$Mul`](#Mul.21.16) - - [`$Div`](#Div.21.17) - - [`$DivBy`](#DivBy.21.18) - - [`$Mod`](#Mod.21.19) - - [`$Apply`](#Apply.21.20) - - [`$Function`](#Function.21.21) - - [`$Cast`](#Cast.21.22) - - [`$If`](#If.21.23) - - [`$IsOf`](#IsOf.21.24) - - [`$LabeledElement`](#LabeledElement.21.25) - - [`$LabeledElementReference`](#LabeledElementReference.21.26) - - [`$Null`](#Null.21.27) - - [`$UrlRef`](#UrlRef.21.28) + - [`$Collection`](#Collection.16.3) + - [`$Nullable`](#Nullable.16.4) +- [Entity Container Object](#EntityContainerObject.17) + - [`$Extends`](#Extends.17.1) +- [Entity Set Object](#EntitySetObject.18) + - [`$Collection`](#Collection.18.1) + - [`$Type`](#Type.18.2) + - [`$IncludeInServiceDocument`](#IncludeInServiceDocument.18.3) +- [Singleton Object](#SingletonObject.19) + - [`$Type`](#Type.19.1) + - [`$Nullable`](#Nullable.19.2) + - [`$NavigationPropertyBinding`](#NavigationPropertyBinding.19.3) +- [Action Import Object](#ActionImportObject.20) + - [`$Action`](#Action.20.1) + - [`$EntitySet`](#EntitySet.20.2) +- [Function Import Object](#FunctionImportObject.21) + - [`$Function`](#Function.21.1) + - [`$EntitySet`](#EntitySet.21.2) + - [`$IncludeInServiceDocument`](#IncludeInServiceDocument.21.3) +- [Term Object](#TermObject.22) + - [`$Type`](#Type.22.1) + - [`$Collection`](#Collection.22.2) + - [`$Nullable`](#Nullable.22.3) + - [`$DefaultValue`](#DefaultValue.22.4) + - [`$BaseTerm`](#BaseTerm.22.5) + - [`$AppliesTo`](#AppliesTo.22.6) +- [Annotation Member](#AnnotationMember.23) + - [`$Path`](#Path.23.1) + - [`$And`](#And.23.2) + - [`$Or`](#Or.23.3) + - [`$Not`](#Not.23.4) + - [`$Eq`](#Eq.23.5) + - [`$Ne`](#Ne.23.6) + - [`$Gt`](#Gt.23.7) + - [`$Ge`](#Ge.23.8) + - [`$Lt`](#Lt.23.9) + - [`$Le`](#Le.23.10) + - [`$Has`](#Has.23.11) + - [`$In`](#In.23.12) + - [`$Neg`](#Neg.23.13) + - [`$Add`](#Add.23.14) + - [`$Sub`](#Sub.23.15) + - [`$Mul`](#Mul.23.16) + - [`$Div`](#Div.23.17) + - [`$DivBy`](#DivBy.23.18) + - [`$Mod`](#Mod.23.19) + - [`$Apply`](#Apply.23.20) + - [`$Function`](#Function.23.21) + - [`$Cast`](#Cast.23.22) + - [`$If`](#If.23.23) + - [`$IsOf`](#IsOf.23.24) + - [`$LabeledElement`](#LabeledElement.23.25) + - [`$LabeledElementReference`](#LabeledElementReference.23.26) + - [`$Null`](#Null.23.27) + - [`$UrlRef`](#UrlRef.23.28) ::: ------- diff --git a/odata-csdl/12 Action and Function.md b/odata-csdl/12 Action and Function.md index b69c82d70..70d6ed20a 100644 --- a/odata-csdl/12 Action and Function.md +++ b/odata-csdl/12 Action and Function.md @@ -255,7 +255,11 @@ returned collection. ::: {.varjson .rep} ### ##subisec `$ReturnType` -The value of `$ReturnType` is an object. It MAY contain the members +The value of `$ReturnType` is an object. + +### ##isec Return Type Object + +The return type object MAY contain the members `$Type`, `$Collection`, `$Nullable`, [`$MaxLength`](#MaxLength), [`$Unicode`](#Unicode), [`$Precision`](#Precision), [`$Scale`](#Scale), and [`$SRID`](#SRID). @@ -357,6 +361,7 @@ the parameter value is a collection, the facets apply to the items in the collection. ::: {.varjson .rep} +### ##isec Parameters in Action and Function Object ### ##subisec `$Parameter` The value of `$Parameter` is an array. The array contains one object per