Closed justinfx closed 2 weeks ago
insecureSkipVerify
must be boolean as per schema see Line 4204
oneOf
validates against all subschemas and checks that it exactly validates with just one subschema.
kind
is used defined field. from schema point of view it is not treated as switch
if you want error on undefined fields, you should use additionalProperties: false
in your schema
I just wanted to start by saying after trying a few different jsonschema validation libraries, yours has been the closest to handling my particular schema correctly.
Given the following jsonschema: https://github.com/argoproj/argo-events/blob/master/api/jsonschema/schema.json
It uses a top level object that is a
oneOf
of 3 possible types:And then the following yaml input:
I get the following output:
The validation about
insecureSkipVerify
is spot on. However given that the top leveloneOf
says it could be one of 3 different types, it seems to be validating against all 3 instead of just theEventSource
kind.Bonus points, it doesn't seem to catch undefined fields, like "BADFIELD"