argo-workflows
argo-workflows copied to clipboard
Improve schema by utilizing "additionalProperties": false
Summary
Many definitions are missing additionalProperties, and by default JSON Schema assumes additional properties are allowed if additionalProperties is missing. Consequently, mistyped properties are easily missed as validators considers those valid additional properties even if an object actually doesn't allow additional properties.
Basically only need to add "additionalProperties": false to each definition that doesn't permit additional properties.
Reference: https://json-schema.org/understanding-json-schema/reference/object.html#additional-properties https://github.com/argoproj/argo-workflows/blob/master/api/jsonschema/schema.json
Use Cases
Better validation, particularly catching mistyped properties early on.
Message from the maintainers:
Love this enhancement proposal? Give it a 👍. We prioritise the proposals with the most 👍.
Sounds good. Would you like to submit a PR?