Closed shadowspawn closed 2 years ago
I tried a few more failures, and saw much simpler and more direct messages. Whew!
$ support validate
Error in support JSON
ADDTIONAL PROPERTY should NOT have additional properties
> 1 | {"versions":[{"version":"*","target":{"node":"*"},"response":{"type":"24-7"},"backxing":{"none":""}}]}
| ^^^^^^^^^^ π² backxing is not expected to be here!
The output is a result of the json validator used under the covers. It sometimes does have quite a few messages with only one being useful. Receptive to any suggestions/PRs that tweak to improve where possible.
I guess one option might be to pre-validate the response type. We'd have to see how easy/hard that is...
Closing this as a first-experience comment, rather than a call for action. Thanks for the tool!
I entered an invalid type during testing and was surprised by the output. This was my first fail, so not sure if this is typical or I found a poorly handled case. Only the middle one "enum should be equal to one of the allowed values" seemed directly useful. The "type should be array" seems just wrong, as the "response" field is the one that may be an array?
(This is a file created by
support create
with just the "type" field modified.)