-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: disallow condition depending on the containing property #128
Conversation
85ad313
to
d5c478a
Compare
The dropdown choices condition is still missing here. |
d5c478a
to
13bd940
Compare
13bd940
to
2ce41dd
Compare
2ce41dd
to
ff6cc7d
Compare
Choices#condition is there. The solution works in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sold on whether baking this into the JSON schema validator is a good thing, especially as it adds quite some complexity to it.
Good thing is that we $comment
on what is happening why. What would be the alternative, and did you consider it? I guess programmatic validation?
The alternative would be to implement the solution directly in https://github.com/bpmn-io/element-templates-validator. Let's consider the pros and cons of each option. JSON schema: JS validator: Also notice that the actual implementation is only in these two files:
The rest is refactoring via 34db754 |
I subscribe to the pros and cons, thanks for outlining them here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Closes #125
Note that this requires the validator to accept
$data
property. The monaco editor handles this correctly, and inajv
you need to pass$data: true
to the constructor.