Namespace: Org.OData.Validation.V1
Terms describing validation rules
Term | Type | Description |
---|---|---|
Pattern | String | The pattern that a string property, parameter, or term must match. This SHOULD be a valid regular expression, according to the ECMA 262 regular expression dialect. |
Minimum | PrimitiveType | Minimum value that a property, parameter, or term can have. Can be annotated with: - Exclusive |
Maximum | PrimitiveType | Maximum value that a property, parameter, or term can have. Can be annotated with: - Exclusive |
Exclusive | Tag | Tags a Minimum or Maximum as exclusive, i.e. an open interval boundary. |
AllowedValues | [AllowedValue] | A collection of valid values for the annotated property, parameter, or type definition |
MultipleOf | Decimal | The value of the annotated property, parameter, or term must be an integer multiple of this positive value. For temporal types, the value is measured in seconds. |
Constraint | ConstraintType | Condition that the annotation target has to fulfill |
ItemsOf | [ItemsOfType] | A list of constraints describing that entities related via one navigation property MUST also be related via another, collection-valued navigation property. The same path value MUST NOT occur more than once.Example: entity type Customer has navigation properties AllOrders , OpenOrders , and ClosedOrders . The term allows to express that items of OpenOrders and ClosedOrders are also items of the AllOrders navigation property, even though they are defined in an Orders entity set. |
OpenPropertyTypeConstraint | [QualifiedTypeName] | Dynamic properties added to the annotated open structured type are restricted to the listed types. |
DerivedTypeConstraint | [QualifiedTypeName] | Values are restricted to types that are both identical to or derived from the declared type and a type listed in this collection. This allows restricting values to certain sub-trees of an inheritance hierarchy, including hierarchies starting at the Built-In Abstract Types. Types listed in this collection that are not derived from the declared type of the annotated model element are ignored. |
AllowedTerms | [QualifiedTermName] | Annotate a term of type Edm.AnnotationPath, or a property of type Edm.AnnotationPath that is used within a structured term, to restrict the terms that can be targeted by the path. The annotation path expression is intended to end in a path segment with one of the listed terms. For forward compatibility, clients should be prepared for the annotation to reference terms besides those listed. |
ApplicableTerms | [QualifiedTermName] | Names of specific terms that are applicable and may be applied in the current context. This annotation does not restrict the use of other terms. |
MaxItems | Int64 | The annotated collection must have at most the specified number of items. |
MinItems | Int64 | The annotated collection must have at least the specified number of items. |
Property | Type | Description |
---|---|---|
Value | PrimitiveType? | An allowed value for the property, parameter, or type definition |
Applicable Annotation Terms:
Property | Type | Description |
---|---|---|
FailureMessage | String? | Human-readable message that can be shown to end users if the constraint is not fulfilled |
Condition | Boolean | Value MUST be a dynamic expression that evaluates to true if and only if the constraint is fulfilled |
Entities related via the single- or collection-valued navigation property identified by path
are also related via the collection-valued navigation property identified by target
.
Property | Type | Description |
---|---|---|
path | NavigationPropertyPath | A path to a single- or collection-valued navigation property |
target | NavigationPropertyPath | A path to a collection-valued navigation property |