papinet / papiNet-API

papiNet is a global paper, forest products and bioproducts industry e-Business initiative.
http://www.papinet.org/
Apache License 2.0
9 stars 3 forks source link

basisWeight in version 2.0.0. value has an restriction as minimum: 0 #101

Closed larsolofsson closed 6 months ago

larsolofsson commented 7 months ago

Value in basisWeight has a restriction on value as minimum: 0 If it should be a restriction, it should be >0. Other paper properties don't have any restrictions, e.g. bulk, caliper etc. These properties can also only have values >0. Should restrictions be specified on all properties that can have only values >0? Or should the restriction on basisWeight be removed?

    basisWeight: # This is the result of a nice compromise between EU and US usage.
      type: object
      required:
        - value
        - UOM
      properties:
        sizeType:
          type: string
          enum:
            - 24x36
            - 25x38
        value:
          type: number
          minimum: 0
        UOM:
          type: string
          enum:
            - GramsPerSquareMeter
            - Pound
patricekrakow commented 7 months ago

Indeed, for the value of the basisWeight, we should use exclusiveMinimum instead of minimum. We will review the other properties of the Paper schema...

patricekrakow commented 7 months ago

We will implement these constraints:

We will also add this constraint to be consistent:

We will consider these changes as incompatible and then implement them in 3.0.0.

patricekrakow commented 7 months ago

We decided to go with the above.

patricekrakow commented 6 months ago

All the changes (add constraints) has been added in papiNet-API.PROPOSAL.yaml, see commit c61c466 and commit 665b003 for the last constraint - quantityValue >= 0 - which was not properly set.

patricekrakow commented 6 months ago

We closed this issue with @larsolofsson, @bengtwentus and @MrNordenberg.