cnabio / duffle

CNAB installer
https://duffle.sh
MIT License
375 stars 54 forks source link

Integer validation prints message as if floating point #842

Open itowlson opened 5 years ago

itowlson commented 5 years ago

Definition:

    "port": {
      "type": "integer",
      "default": 8080,
      "minimum": 1000,
      "maximum": 9999
    }

Command:

duffle install sr141436 .\data\bundle.json -f --set port=8087789

Error message:

Error: cannot use value: 8087789 as parameter port: must be less than or equal to 9999.000000

I expected the bound to be printed as 9999 rather than 9999.000000.

jeremyrickard commented 5 years ago

This appears to be because of the JSON Schema validation library. I'll see if we can have it handle numeric types more appropriately.