diff --git a/docs/odata-csdl-json/odata-csdl-json.html b/docs/odata-csdl-json/odata-csdl-json.html index e05c7694..718ece73 100644 --- a/docs/odata-csdl-json/odata-csdl-json.html +++ b/docs/odata-csdl-json/odata-csdl-json.html @@ -464,25 +464,35 @@
null
valuesIf
without else part in collections$MaxLength
The value of $MaxLength
is a positive integer.
Note: OData-CSDL-XML defines a symbolic value max
that is only allowed in OData 4.0 responses. This symbolic value is not allowed in CDSL JSON documents at all. Services MAY instead specify the concrete maximum length supported for the type by the service or omit the member entirely.
Note: OData-CSDLXML, section 3.4.1 defines a symbolic value max
that is only allowed in OData 4.0 responses. This symbolic value is not allowed in CDSL JSON documents at all. Services MAY instead specify the concrete maximum length supported for the type by the service or omit the member entirely.
A reference to an external CSDL document allows to bring part of the referenced document’s content into the scope of the referencing document.
A reference MUST specify a URI that uniquely identifies the referenced document, so two references MUST NOT specify the same URI. The URI SHOULD be a URL that locates the referenced document. If the URI is not dereferencable it SHOULD identify a well-known schema. The URI MAY be absolute or relative URI; relative URLs are relative to the URL of the document containing the reference, or relative to a base URL specified in a format-specific way.
A reference MAY be annotated.
-The Core.SchemaVersion
annotation, defined in OData-VocCore, MAY be used to indicate a particular version of the referenced document. If the Core.SchemaVersion
annotation is present, the $schemaversion
system query option, defined OData-Protocol, SHOULD be used when retrieving the referenced schema document.
The Core.SchemaVersion
annotation, defined in OData-VocCore, MAY be used to indicate a particular version of the referenced document. If the Core.SchemaVersion
annotation is present, the $schemaversion
system query option, defined in OData-Protocol, section 11.2.12, SHOULD be used when retrieving the referenced schema document.
$Reference
The value of $Reference
is an object that contains one member per referenced CSDL document. The name of the pair is a URI for the referenced document. The URI MAY be relative to the document containing the $Reference
. The value of each member is a reference object.
An entity type MAY indicate that it is open and allows clients to add properties dynamically to instances of the type by specifying uniquely named property values in the payload used to insert or update an instance of the type.
An entity type derived from an open entity type MUST indicate that it is also open.
-Note: structural and navigation properties MAY be returned by the service on instances of any structured type, whether or not the type is marked as open. Clients MUST always be prepared to deal with additional properties on instances of any structured type, see OData-Protocol.
+Note: structural and navigation properties MAY be returned by the service on instances of any structured type, whether or not the type is marked as open. Clients MUST always be prepared to deal with additional properties on instances of any structured type, see OData-Protocol, section 3.
$OpenType
The value of $OpenType
is one of the Boolean literals true
or false
. Absence of the member means false
.
$OpenType
An entity type that does not specify a base type MAY indicate that it is a media entity type. Media entities are entities that represent a media stream, such as a photo. Use a media entity if the out-of-band stream is the main topic of interest and the media entity is just additional structured information attached to the stream. Use a normal entity with one or more properties of type Edm.Stream
if the structured data of the entity is the main topic of interest and the stream data is just additional information attached to the structured data. For more information on media entities see OData-Protocol.
An entity type that does not specify a base type MAY indicate that it is a media entity type. Media entities are entities that represent a media stream, such as a photo. Use a media entity if the out-of-band stream is the main topic of interest and the media entity is just additional structured information attached to the stream. Use a normal entity with one or more properties of type Edm.Stream
if the structured data of the entity is the main topic of interest and the stream data is just additional information attached to the structured data. For more information on media entities see OData-Protocol, section 11.2.3.
An entity type derived from a media entity type MUST indicate that it is also a media entity type.
Media entity types MAY specify a list of acceptable media types using an annotation with term Core.AcceptableMediaTypes
, see OData-VocCore.
Edm.String
Edm.TimeOfDay
Key property values MAY be language-dependent, but their values MUST be unique across all languages and the entity-ids (defined in OData-Protocol) MUST be language independent.
+Key property values MAY be language-dependent, but their values MUST be unique across all languages and the entity-ids (defined in OData-Protocol, section 4.1) MUST be language independent.
A key property MUST be a non-nullable primitive property of the entity type itself, including non-nullable primitive properties of non-nullable single-valued complex properties, recursively.
In OData 4.01 the key properties of a directly related entity type MAY also be part of the key if the navigation property is single-valued and not nullable. This includes navigation properties of non-nullable single-valued complex properties (recursively) of the entity type. If a key property of a related entity type is part of the key, all key properties of the related entity type MUST also be part of the key.
If the key property is a property of a complex property (recursively) or of a directly related entity type, the key MUST specify an alias for that property that MUST be a simple identifier and MUST be unique within the set of aliases, structural and navigation properties of the declaring entity type and any of its base types.
@@ -1485,7 +1495,7 @@If no value is specified, the client SHOULD NOT assume a default value.
$DefaultValue
The value of $DefaultValue
is the type-specific JSON representation of the default value of the property, see OData-JSON. For properties of type Edm.Decimal
and Edm.Int64
the representation depends on the media type parameter IEEE754Compatible
.
The value of $DefaultValue
is the type-specific JSON representation of the default value of the property, see OData-JSON, section 7.1. For properties of type Edm.Decimal
and Edm.Int64
the representation depends on the media type parameter IEEE754Compatible
.
Instances of the structured type that declares the navigation property, either directly or indirectly via a property of complex type, contain the entities referenced by the containment navigation property. The canonical URL for contained entities is the canonical URL of the containing instance, followed by the path segment of the navigation property and the key of the contained entity, see OData-URL, section 4.3.2.
Entity types used in collection-valued containment navigation properties MUST have a key defined.
For items of an ordered collection of complex types (those annotated with the Core.Ordered
term defined in OData-VocCore the canonical URL of the item is the canonical URL of the collection appended with a segment containing the zero-based ordinal of the item. Items within in an unordered collection of complex types do not have a canonical URL. Services that support unordered collections of complex types declaring a containment navigation property, either directly or indirectly via a property of complex type, MUST specify the URL for the navigation link within a payload representing that item, according to format-specific rules.
OData 4.0 responses MUST NOT specify a complex type declaring a containment navigation property as the type of a collection-valued property.
@@ -1746,7 +1756,7 @@A complex type MAY indicate that it is open and allows clients to add properties dynamically to instances of the type by specifying uniquely named property values in the payload used to insert or update an instance of the type.
A complex type derived from an open complex type MUST indicate that it is also open.
-Note: structural and navigation properties MAY be returned by the service on instances of any structured type, whether or not the type is marked as open. Clients MUST always be prepared to deal with additional properties on instances of any structured type, see OData‑Protocol.
+Note: structural and navigation properties MAY be returned by the service on instances of any structured type, whether or not the type is marked as open. Clients MUST always be prepared to deal with additional properties on instances of any structured type, see OData-Protocol, section 3.
$OpenType
The value of $OpenType
is one of the Boolean literals true
or false
. Absence of the member means false
.
$Type
and $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.
For 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.
For single-valued return types the value true
means that the action or function MAY return a single null
value. The value false
means that the action or function will never return a null
value and instead will fail with an error response if it cannot compute a result.
Core.IsDelta
Metadata annotations are terms applied to model elements. Behaviors or constraints described by a metadata annotation must be consistent with the annotated model element. Such annotations define additional behaviors or constraints on the model element, such as a service, entity type, property, function, action, or parameter. For example, a metadata annotation may define ranges of valid values for a particular property. Metadata annotations are applied in CSDL documents describing or referencing an entity model.
-Instance annotations are terms applied to a particular instance within an OData payload, such as described in OData-JSON. An instance annotation can be used to define additional information associated with a particular result, entity, property, or error. For example, whether a property is read-only for a particular instance. Where the same annotation is defined at both the metadata and instance level, the instance-level annotation overrides the annotation specified at the metadata level. Annotations that apply across instances should be specified as metadata annotations.
+Instance annotations are terms applied to a particular instance within an OData payload, such as described in OData-JSON, section 20. An instance annotation can be used to define additional information associated with a particular result, entity, property, or error. For example, whether a property is read-only for a particular instance. Where the same annotation is defined at both the metadata and instance level, the instance-level annotation overrides the annotation specified at the metadata level. Annotations that apply across instances should be specified as metadata annotations.
A vocabulary is a schema containing a set of terms where each term is a named metadata extension. Anyone can define a vocabulary (a set of terms) that is scenario-specific or company-specific; more commonly used terms can be published as shared vocabularies such as the OData Core vocabulary OData-VocCore.
A term can be used to:
$Nullable
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
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.
The value of $DefaultValue
is the type-specific JSON representation of the default value of the term, see OData-JSON, section 7.1.
Note: the $DefaultValue
member is purely for documentation and isomorphy to OData-CSDLXML, section 7.3. Annotations in CSDL JSON documents MUST always specify an explicit value.
Values are represented as GeoJSON, see OData-JSON.
+Values are represented as GeoJSON, see RFC7946.
Example 58:
@@ -2942,7 +2951,7 @@Constant values of type Edm.Stream
are represented according to OData-JSON and MUST be accompanied by the mediaContentType
control information to indicate how the stream value is to be interpreted.
Constant values of type Edm.Stream
are represented according to OData-JSON, section 9 and MUST be accompanied by the mediaContentType
control information to indicate how the stream value is to be interpreted.
The annotation (property) being assigned a stream value MUST be annotated with term Core.MediaType
and the media type of the stream as its value.
Model paths and instance paths share a common syntax which is derived from the path expression syntax of URLs, see OData-URL.
+Model paths and instance paths share a common syntax which is derived from the path expression syntax of URLs, see OData-URL, section 5.1.1.15.
A path MUST be composed of zero or more path segments joined together by forward slashes (/
).
Paths starting with a forward slash (/
) are absolute paths, and the first path segment MUST be the qualified name of a model element, e.g. an entity container. The remaining path after the second forward slash is interpreted relative to that model element.
…/Items@Core.Description
…/Items/@Core.Description
An instance path MAY contain path segments starting with an entity set or a collection-valued navigation property, then followed by a key predicate using parentheses-style convention, see OData-URL. The key values are either primitive literals or instance paths. If the key value is a relative instance path, it is interpreted according to the same rule below as the instance path it is part of, not relative to the instance identified by the preceding path part.
+An instance path MAY contain path segments starting with an entity set or a collection-valued navigation property, then followed by a key predicate using parentheses-style convention, see OData-URL, section 4.3.1. The key values are either primitive literals or instance paths. If the key value is a relative instance path, it is interpreted according to the same rule below as the instance path it is part of, not relative to the instance identified by the preceding path part.
Example 67: instance path with entity set and key predicate
/self.container/SettingsCollection('FeatureXxx')/IsAvailable
@@ -3233,7 +3242,7 @@ The And
and Or
operators require two operand expressions that evaluate to Boolean values. The Not
operator requires a single operand expression that evaluates to a Boolean value. For details on null handling for comparison operators see OData-URL, section 5.1.1.1.
The other comparison operators require two operand expressions that evaluate to comparable values.
$And
and $Or
$Eq
, 14.4.3 Arithmetic OperatorsAnnotations MAY use the following arithmetic expressions which evaluate to a numeric value. These expressions MAY be combined, and they MAY be used anywhere instead of a numeric expression of the appropriate type. The semantics and evaluation rules for each arithmetic expression is identical to the corresponding arithmetic operator defined in OData-URL.
+Annotations MAY use the following arithmetic expressions which evaluate to a numeric value. These expressions MAY be combined, and they MAY be used anywhere instead of a numeric expression of the appropriate type. The semantics and evaluation rules for each arithmetic expression is identical to the corresponding arithmetic operator defined in OData-URL, section 5.1.1.2.