Details

    • Proposal:
      Hide

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

      Show
      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..
    • Resolution:
      Show
      https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/vocabularies/Org.OData.Validation.V1.xml?rev=744

      Description

      These would map to equivalent concepts in JSON Schema.

        Attachments

          Activity

          mikep Michael Pizzo (Inactive) created issue -
          handl Ralf Handl made changes -
          Field Original Value New Value
          Component/s OData JSON CSDL [ 10920 ]
          handl Ralf Handl made changes -
          Fix Version/s V4.01_WD01 [ 10276 ]
          Fix Version/s V4.0_WD01 [ 10247 ]
          handl Ralf Handl made changes -
          Component/s Vocabularies [ 10324 ]
          Hide
          handl Ralf Handl added a comment -

          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>

          Show
          handl Ralf Handl added a comment - 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>
          handl Ralf Handl made changes -
          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
          mikep Michael Pizzo (Inactive) made changes -
          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..
          mikep Michael Pizzo (Inactive) made changes -
          Status New [ 10000 ] Open [ 1 ]
          Hide
          mikep Michael Pizzo (Inactive) added a comment -

          Resolved according to revised proposal:

          Add the pattern term as proposed, along with Validation.Minimum and Validation.Maximum terms of type Edm.Decimal and tagging term "Validation.Exclusive" that can be used to annotate the minimum and maximum terms.

          Show
          mikep Michael Pizzo (Inactive) added a comment - Resolved according to revised proposal: Add the pattern term as proposed, along with Validation.Minimum and Validation.Maximum terms of type Edm.Decimal and tagging term "Validation.Exclusive" that can be used to annotate the minimum and maximum terms.
          mikep Michael Pizzo (Inactive) made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          handl Ralf Handl made changes -
          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 ]
          Hide
          mikep Michael Pizzo (Inactive) added a comment -

          I would like to figure out how we can make this vocabulary more dynamic (i.e., iterate on it in the community).

          Once we have it defined, I would like to reference it from the JSON CSDL document to define that the annotations are translated to the equivalent JSON Schema keywords.

          Show
          mikep Michael Pizzo (Inactive) added a comment - I would like to figure out how we can make this vocabulary more dynamic (i.e., iterate on it in the community). Once we have it defined, I would like to reference it from the JSON CSDL document to define that the annotations are translated to the equivalent JSON Schema keywords.
          mikep Michael Pizzo (Inactive) made changes -
          Status Applied [ 10002 ] Closed [ 6 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              mikep Michael Pizzo (Inactive)
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: