Skip to content
This repository has been archived by the owner on Jan 10, 2022. It is now read-only.

All parameter schema's unecessarily have "minItems": 0.0 #130

Closed
soxofaan opened this issue Aug 26, 2021 · 7 comments
Closed

All parameter schema's unecessarily have "minItems": 0.0 #130

soxofaan opened this issue Aug 26, 2021 · 7 comments

Comments

@soxofaan
Copy link
Member

While comparing the VITO and EODC process listings for openEOPlatform/documentation#11 I noticed that all parameter/return schemas have a "minItems": 0.0 field, e.g.

    {
      "id": "absolute",
      "parameters": [
        {
          "name": "x",
          "schema": {
            "minItems": 0.0,
            "type": ["number", "null"]
          }
        }
      ],
      "returns": {
        "schema": {
          "minItems": 0.0,
          "type": ["number", "null"]
        }
      },

As far as I know jsonschema, minItems only makes sense for arrays (and it should be an integer, not float)

@m-mohr
Copy link
Member

m-mohr commented Aug 26, 2021

As far as I know jsonschema, minItems only makes sense for arrays (and it should be an integer, not float)

Yes, indeed.

I guess the default needs to be removed:

minItems = fields.Float(default=0, attribute='min_items')

@sophieherrmann
Copy link
Collaborator

Yes we set a default as defined in the api. But I can remove it.

@m-mohr
Copy link
Member

m-mohr commented Aug 26, 2021

The default value in the API means that this is the value to be used if it is not provided (in the backend response), but you provide it explicitly, which is not the desired behavior. Would be good to remove it.

@sophieherrmann
Copy link
Collaborator

Makes sense, I already have a fix for this. I plan to bring it to dev today and then to prod as soon as possible.

@sophieherrmann
Copy link
Collaborator

Fix is deployed in production, checkout https://openeo.eodc.eu/v1.0/processes

@soxofaan
Copy link
Member Author

Just curious: where did you fix this? There doesn't seem to be any recent updates on https://github.com/Open-EO/openeo-eodc-driver/branches

@sophieherrmann
Copy link
Collaborator

We moved our backend development to our private gitlab server.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants