diff --git a/docs/odata-csdl-json/odata-csdl-json.html b/docs/odata-csdl-json/odata-csdl-json.html index f7120333b..81bded837 100644 --- a/docs/odata-csdl-json/odata-csdl-json.html +++ b/docs/odata-csdl-json/odata-csdl-json.html @@ -698,14 +698,14 @@

-

Document Object

+

Document Object

A CSDL JSON document consists of a single JSON object. This document object MUST contain the member $Version.

The document object MAY contain the member $Reference to reference other CSDL documents.

It also MAY contain members for schemas.

If the CSDL JSON document is the metadata document of an OData service, the document object MUST contain the member $EntityContainer.

-

$Version

+

$Version

The value of $Version is a string containing either 4.0 or 4.01.

-

$EntityContainer

+

$EntityContainer

The value of $EntityContainer is the namespace-qualified name of the entity container of that service. This is the only place where a model element MUST be referenced with its namespace-qualified name and use of the alias-qualified name is not allowed.

@@ -724,9 +724,9 @@

4.1 ReferenceA 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.

-

$Reference

+

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

-

Reference Object

+

Reference Object

The reference object MAY contain the members $Include and $IncludeAnnotations as well as annotations.

@@ -758,12 +758,12 @@

4.2

The alias MUST NOT be one of the reserved values Edm, odata, System, or Transient.

An alias is only valid within the document in which it is declared; a referencing document may define its own aliases for included schemas.

-

$Include

+

$Include

The value of $Include is an array. Array items are objects that MUST contain the member $Namespace and MAY contain the member $Alias.

The item objects MAY contain annotations.

-

$Namespace

+

$Namespace

The value of $Namespace is a string containing the namespace of the included schema.

-

$Alias

+

$Alias

The value of $Alias is a string containing the alias for the included schema.

@@ -808,13 +808,13 @@

target MAY be specified. If a target namespace is specified, only those annotations which apply a term form the specified term namespace to a model element of the target namespace (with the specified qualifier, if present) SHOULD be included. If no target namespace is specified, all annotations within the referenced document from the specified term namespace (taking into account the qualifier, if present) SHOULD be included.

The target namespace also provides consumers insight about what namespaces are present in the referenced document. If the consumer is not interested in that particular target namespace, the consumer can opt not to inspect the referenced document.

-

$IncludeAnnotations

+

$IncludeAnnotations

The value of $IncludeAnnotations is an array. Array items are objects that MUST contain the member $TermNamespace and MAY contain the members $Qualifier and $TargetNamespace.

-

$TermNamespace

+

$TermNamespace

The value of $TermNamespace is a namespace.

-

$Qualifier

+

$Qualifier

The value of $Qualifier is a simple identifier.

-

$TargetNamespace

+

$TargetNamespace

The value of $TargetNamespace is a namespace.

@@ -862,8 +862,8 @@

5 Schema

The schema's namespace is combined with the name of elements in the schema to create unique qualified names, so identifiers that are used to name types MUST be unique within a namespace to prevent ambiguity.

Names are case-sensitive, but service authors SHOULD NOT choose names that differ only in case.

The namespace MUST NOT be one of the reserved values Edm, odata, System, or Transient.

-
-

Schema Object

+
+

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 also contain annotations that apply to the schema itself.

@@ -873,8 +873,8 @@

5.1 Alias

If a schema specifies an alias, the alias MUST be used instead of the namespace within qualified names throughout the document to identify model elements of that schema. A mixed use of namespace-qualified names and alias-qualified names is not allowed.

Aliases are document-global, so all schemas defined within or included into a document MUST have different aliases, and aliases MUST differ from the namespaces of all schemas defined within or included into a document. Aliases defined by a schema can be used throughout the containing document and are not restricted to the schema that defines them.

The alias MUST NOT be one of the reserved values Edm, odata, System, or Transient.

-
-

$Alias

+
+

$Alias

The value of $Alias is a string containing the alias for the schema.

@@ -890,8 +890,8 @@

$Alias

}

5.2 Annotations with External Targeting

-
-

$Annotations

+
+

$Annotations

The value of $Annotations is an object with one member per annotation target. The member name is a path identifying the annotation target, the member value is an object containing annotations for that target.

@@ -912,8 +912,8 @@

6 Entity Type

The entity type's name is a simple identifier that MUST be unique within 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.

-
-

Entity Type Object

+
+

Entity Type Object

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

The entity type object MUST contain the member $Kind with a string value of EntityType.

It MAY contain the members $BaseType, $Abstract, $OpenType, $HasStream, and $Key.

@@ -940,8 +940,8 @@

key as well as structural and navigation properties of its base type.

An entity type MUST NOT introduce an inheritance cycle by specifying a base type.

-
-

$BaseType

+
+

$BaseType

The value of $BaseType is the qualified name of the base type.

@@ -968,24 +968,24 @@

key or derive from a base type with a defined key.

An abstract entity type MUST NOT inherit from a non-abstract entity type.

-
-

$Abstract

+
+

$Abstract

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

6.3 Open Entity Type

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.

-
-

$OpenType

+
+

$OpenType

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

6.4 Media Entity Type

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

-
-

$HasStream

+
+

$HasStream

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

6.5 Key

@@ -1016,8 +1016,8 @@

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

An alias MUST NOT be defined if the key property is a primitive property of the entity type itself.

For key properties that are a property of a complex or navigation property, the alias MUST be used in the key predicate of URLs instead of the path to the property because the required percent-encoding of the forward slash separating segments of the path to the property would make URL construction and parsing rather complicated. The alias MUST NOT be used in the query part of URLs, where paths to properties don't require special encoding and are a standard constituent of expressions anyway.

-
-

$Key

+
+

$Key

The value of $Key is an array with one item per key property.

Key properties without a key alias are represented as strings containing the property name.

Key properties with a key alias are represented as objects with one member whose name is the key alias and whose value is a string containing the path to the property.

@@ -1101,8 +1101,8 @@

type.

The property's name MUST be a simple identifier. It is used when referencing, serializing or deserializing the property. It MUST be unique within the set of structural and navigation properties of the declaring structured type, and MUST NOT match the name of any navigation property in any of its base types. If a structural property with the same name is defined in any of this type's base types, then the property's type MUST be a type derived from the type specified for the property of the base type and constrains this property to be of the specified subtype for instances of this structured type. The name MUST NOT match the name of any structural or navigation property of any of this type's base types for OData 4.0 responses.

Names are case-sensitive, but service authors SHOULD NOT choose names that differ only in case.

-
-

Property Object

+
+

Property Object

Structural properties are represented as members of the object representing a structured type. The member name is the property name, the member value is an object.

The property object MAY contain the member $Kind with a string value of Property. This member SHOULD be omitted to reduce document size.

It MAY contain the member $Type, $Collection, $Nullable, $MaxLength, $Unicode, $Precision, $Scale, $SRID, and $DefaultValue.

@@ -1127,8 +1127,8 @@

7.1 Type

The property's type MUST be a primitive type, complex type, or enumeration type in scope, or a collection of one of these types.

A collection-valued property MAY be annotated with the Core.Ordered term, defined in OData-VocCore, to specify that it supports a stable ordering.

A collection-valued property MAY be annotated with the Core.PositionalInsert term, defined in OData-VocCore, to specify that it supports inserting items into a specific ordinal position.

-
-

$Type and $Collection

+
+

$Type and $Collection

For single-valued properties the value of $Type is the qualified name of the property's type.

For collection-valued properties the value of $Type is the qualified name of the property'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. This member SHOULD be omitted for string properties to reduce document size.

@@ -1144,8 +1144,8 @@

7.2 Type Facets<

For single-valued properties the facets apply to the value of the property. For collection-valued properties the facets apply to the items in the collection.

7.2.1 Nullable

A Boolean value specifying whether the property can have the value null.

-
-

$Nullable

+
+

$Nullable

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

For single-valued properties the value true means that the property allows the null value.

For collection-valued properties the property 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.

@@ -1153,8 +1153,8 @@

$Nullable

7.2.2 MaxLength

A positive integer value specifying the maximum length of a binary, stream or string value. For binary or stream values this is the octet length of the binary data, for string values it is the character length (number of code points for Unicode).

If no maximum length is specified, clients SHOULD expect arbitrary length.

-
-

$MaxLength

+
+

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

@@ -1163,8 +1163,8 @@

7.2.3 Precision

For a temporal value (datetime-with-timezone-offset, duration, or time-of-day): the number of decimal places allowed in the seconds portion of the value; it MUST be a non-negative integer between zero and twelve.

Note: service authors SHOULD be aware that some clients are unable to support a precision greater than 28 for decimal properties and 7 for temporal properties. Client developers MUST be aware of the potential for data loss when round-tripping values of greater precision. Updating via PATCH and exclusively specifying modified properties will reduce the risk for unintended data loss.

Note: duration properties supporting a granularity less than seconds (e.g. minutes, hours, days) can be annotated with term Measures.DurationGranularity, see OData-VocMeasures.

-
-

$Precision

+
+

$Precision

The value of $Precision is a number.

Absence of $Precision means arbitrary precision.

@@ -1183,8 +1183,8 @@

7.2.4 Scale

An integer value means that the number of digits to the right of the decimal point may vary from zero to the value of the Scale facet, and the number of digits to the left of the decimal point may vary from one to the value of the Precision facet minus the value of the Scale facet. If Precision is equal to Scale, a single zero MUST precede the decimal point.

The value of Scale MUST be less than or equal to the value of Precision.

Note: if the underlying data store allows negative scale, services may use a Precision with the absolute value of the negative scale added to the actual number of significant decimal digits, and client-provided values may have to be rounded before being stored.

-
-

$Scale

+
+

$Scale

The value of $Scale is a number or a string with one of the symbolic values floating or variable.

Services SHOULD use lower-case values; clients SHOULD accept values in a case-insensitive manner.

Absence of $Scale means variable.

@@ -1231,23 +1231,23 @@

$Scale

7.2.5 Unicode

For a string property the Unicode facet indicates whether the property might contain and accept string values with Unicode characters (code points) beyond the ASCII character set. The value false indicates that the property will only contain and accept string values with characters limited to the ASCII character set.

If no value is specified, the Unicode facet defaults to true.

-
-

$Unicode

+
+

$Unicode

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

7.2.6 SRID

For a geometry or geography property the SRID facet identifies which spatial reference system is applied to values of the property on type instances.

The value of the SRID facet MUST be a non-negative integer or the special value variable. If no value is specified, the facet defaults to 0 for Geometry types or 4326 for Geography types.

The valid values of the SRID facet and their meanings are as defined by the European Petroleum Survey Group EPSG.

-
-

$SRID

+
+

$SRID

The value of $SRID is a string containing a number or the symbolic value variable.

7.2.7 Default Value

A primitive or enumeration property MAY define a default value that is used if the property is not explicitly represented in an annotation or the body of a request or response.

If no value is specified, the client SHOULD NOT assume a default value.

-
-

$DefaultValue

+
+

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


@@ -1255,8 +1255,8 @@

simple identifier. It is used when referencing, serializing or deserializing the navigation property. It MUST be unique within the set of structural and navigation properties of the declaring structured type, and MUST NOT match the name of any structural property in any of its base types. If a navigation property with the same name is defined in any of this type's base types, then the navigation property's type MUST be a type derived from the type specified for the navigation property of the base type, and constrains this navigation property to be of the specified subtype for instances of this structured type. The name MUST NOT match the name of any structural or navigation property of any of this type's base types for OData 4.0 responses.

Names are case-sensitive, but service authors SHOULD NOT choose names that differ only in case.

-
-

Navigation Property Object

+