tagbase / tagbase-server

tagbase-server is a data management web service for working with eTUFF and nc-eTAG files.
https://oiip.jpl.nasa.gov/doc/OIIP_Deliverable7.4_TagbasePostgreSQLeTUFF_UserGuide.pdf
Apache License 2.0
7 stars 2 forks source link

ErrorContainer schema minItems needs to be greater than 0 in openapi.yaml #254

Closed lewismc closed 1 year ago

lewismc commented 1 year ago

The following code block in openapi.yaml

    ErrorContainer:
      description: 'An error response for an operation.'
      type: object
      properties:
        errors:
          type: array
          minItems: 0

... results in SonarCloud reporting the following

The length of a collection is always ">=0", so update this test to either "==0" or ">0".

This is because the bug is carried through to the autogenerated python-flask code generated by the openapi generator.

The fix is for us to set minItems to 1.