Open nikku opened 1 year ago
For transparency, in our draft forms JSON schema, we tried out a more modular approach of defining rules, e.g., also for allowed properties of sub schemas. One way to comprehend the fairly high complexity of these if-then-rules. Maybe this helps as an inspiration 👍
Would your approach directly contribute to better validation?
This approach validates invalid properties for form field types, such as "if NOT this type, then this property is not allowed". IDEs with JSON schema support as VS Code then create such error messages.
Thanks for the update. So this would indeed fix https://github.com/camunda/element-templates-json-schema/issues/110.
Describe the Bug
The schema validation for
binding
is insufficient, allowing to set properties not actually relevant to the existing binding type.Steps to Reproduce
Validate the following template:
See that
binding.key
is an allowed property, despite only allowed ifbinding.type === 'zeebe:taskHeader'
.Expected Behavior
We validate known properties of binding, and ensure they are used correctly.
Environment