-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: V4.0_ERRATA02
-
Fix Version/s: V4.0_WD01, V4.01_WD01
-
Component/s: CSDL JSON, CSDL XML, Vocabularies
-
Labels:None
-
Environment:
Applied
-
Proposal:
-
Resolution:
Field | Original Value | New Value |
---|---|---|
Component/s | OData JSON CSDL [ 10920 ] |
Fix Version/s | V4.01_WD01 [ 10276 ] | |
Fix Version/s | V4.0_WD01 [ 10247 ] |
Component/s | Vocabularies [ 10324 ] |
Proposal |
Start a "Validation" vocabulary with the following: <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="Validation.1.0.0"> <Term Name="Pattern" Type="Edm.String"> <Annotation Term="OData.Description" String="The pattern that a string property or parameter must match."/> </Term> <Term Name="Minimum" Type="Edm.Int64"> <Annotation Term="OData.Description" String="Minimum value that an integer property or parameter can have."/> </Term> <Term Name="Maximum" Type="Edm.Int64"> <Annotation Term="OData.Description" String="Maximum value that an integer property or parameter can have."/> </Term> </Schema> |
Start a "Validation" vocabulary with the following: <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="Validation.1.0.0"> <Term Name="Pattern" Type="Edm.String"> <Annotation Term="OData.Description" String="The pattern that a string property or parameter must match."/> </Term> <Term Name="Minimum" Type="Edm.Int64"> <Annotation Term="OData.Description" String="Minimum value that an integer property or parameter can have."/> </Term> <Term Name="Maximum" Type="Edm.Int64"> <Annotation Term="OData.Description" String="Maximum value that an integer property or parameter can have."/> </Term> </Schema> https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/vocabularies/Org.OData.Validation.V1.xml?op=diff&rev=738 |
Proposal |
Start a "Validation" vocabulary with the following: <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="Validation.1.0.0"> <Term Name="Pattern" Type="Edm.String"> <Annotation Term="OData.Description" String="The pattern that a string property or parameter must match."/> </Term> <Term Name="Minimum" Type="Edm.Int64"> <Annotation Term="OData.Description" String="Minimum value that an integer property or parameter can have."/> </Term> <Term Name="Maximum" Type="Edm.Int64"> <Annotation Term="OData.Description" String="Maximum value that an integer property or parameter can have."/> </Term> </Schema> https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/vocabularies/Org.OData.Validation.V1.xml?op=diff&rev=738 |
Start a "Validation" vocabulary with the following: <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="Validation.1.0.0"> <Term Name="Pattern" Type="Edm.String"> <Annotation Term="OData.Description" String="The pattern that a string property or parameter must match."/> </Term> <Term Name="Minimum" Type="Edm.Decimal"> <Annotation Term="OData.Description" String="Minimum value that a numeric property or parameter can have."/> </Term> <Term Name="Maximum" Type="Edm.Decimal"> <Annotation Term="OData.Description" String="Maximum value that a numeric property or parameter can have."/> </Term> </Schema> plus new term, "Validation.Exclusive", that can be applied to Validation.Minimum and Validataion.Maximum.. |
Status | New [ 10000 ] | Open [ 1 ] |
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/vocabularies/Org.OData.Validation.V1.xml?rev=744 | |
Environment | [Proposed] | Applied |
Status | Resolved [ 5 ] | Applied [ 10002 ] |
Status | Applied [ 10002 ] | Closed [ 6 ] |
JSON Schema "minimum" and "maximum" allow JSON numbers. Shouldn't we rather use Type="Edm.PrimitiveType" to reflect this? Which is of course more generic than "number", but we don't have an abstract type for that yet.
Also JSON Schema has "exclusiveMinimum" and "exclusiveMaximum" to allow open intervals. We could make Minimum and Maximum structured annotations based on the same complex type
<ComplexType Name="Limit">
<Property Name="Value" Type="Edm.PrimitiveType" Nullable="false" /> <!-- or Edm.Number -->
<Property Name="Exclusive" Type="Edm.Boolean" Nullable="false" DefaultValue="false" />
</ComplexType>