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

Paper properties colourDescriptions: and recycled: in version 2.0.0 #97

Closed larsolofsson closed 6 months ago

larsolofsson commented 8 months ago

Why are Paper properties colourDescriptions: and recycled: in version 2.0.0 defined as arrays? Is it an error? All other Paper properties are defined as single values.

   colourDescriptions:
      type: array
      minItems: 1
      items:
        type: string
        minLength: 1
    recycled:
      type: array
      minItems: 1
      items:
        type: object
        required:
          - value
          - UOM
        properties:
          value:
            type: number
          UOM:
            type: string
            enum:
              - Percentage
patricekrakow commented 7 months ago

This looks like a mistake, even before from when we move out of multiple-values-property for the 2.0.0, colourDescription (singular) was missing, as well as for recycled.

colourDescription:
  type: string
  minLength: 1
recycled:
  type: object
  required:
    - value
    - UOM
  properties:
    value:
      type: number
    UOM:
      type: string
      enum:
        - Percentage

Warning: We will correct this with 3.0.0 as it is an incompatible change!

patricekrakow commented 7 months ago

It is also weird/annoying that the recycled property is not a noun, maybe it is the right time to change it to something like recycledContent, so we can have a clear singular and plural forms that can be used in the future. Let's discuss what is the best name:

patricekrakow commented 7 months ago

We decided to go with:

colourDescription:
  type: string
  minLength: 1
recycledContent:
  type: object
  required:
    - value
    - UOM
  properties:
    value:
      type: number
    UOM:
      type: string
      enum:
        - Percentage
patricekrakow commented 6 months ago

I have updated both papiNet-API.PROPOSAL.yaml and papiNet-API.yaml, see commit 45c57ec, so we close the issue.