You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using oneOf can result in a large number of errors from the validator. I'd like to replace a few of these where the same validation could be done easily with a TS function.
Consider the requirement of Next being mutually exclusive with End
This is achieved in the Task with a few lines in the schema:
The check provided by the schema could be done with a visit of the graph in the same way some of the other checks are implemented. This would provide an opportunity to report a simple message that a State cannot have both Next and End
I propose starting with this simple oneOf and replace it with a TS checker.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Using
oneOf
can result in a large number of errors from the validator. I'd like to replace a few of these where the same validation could be done easily with a TS function.Consider the requirement of
Next
being mutually exclusive withEnd
This is achieved in the
Task
with a few lines in the schema:Here's the error message from the test definition
valid-task-timer.json
after altering theTask
to have bothEnd
and a validNext
value.Spoiler..... It's a long list of errors
The check provided by the schema could be done with a visit of the graph in the same way some of the other checks are implemented. This would provide an opportunity to report a simple message that a State cannot have both
Next
andEnd
I propose starting with this simple
oneOf
and replace it with a TS checker.Beta Was this translation helpful? Give feedback.
All reactions