-
Notifications
You must be signed in to change notification settings - Fork 35
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
fix(122): split switch state to separate file #127
Conversation
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.
can you please also add a test using yaml or json that have a invalid switch state (different than Data or Event based switch)? Just to make sure that the parser will complain if something unexpected is typed, e.g. a typo.
Can you explain more clearly (a example will be helpful). IMO, if the user set any field than specification, there will be no error reported (because we only unmarshal the known field). |
@spolti can you answer the comments? @lsytj0413 can you please rebase? |
A good test could be marshall and unmarshall like we did here: https://github.com/serverlessworkflow/sdk-go/blob/main/parser/parser_test.go#L609 use a proposital type to define, let's say, "eventCondition", the result should be nil pointer or a error log telling the value is not valid,. |
done, PTAL |
@ricardozanini resolved conflict, PTAL |
Signed-off-by: lsytj0413 <511121939@qq.com>
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.
Many thanks. :)
Signed-off-by: lsytj0413 511121939@qq.com
Many thanks for submitting your Pull Request ❤️!
What this PR does / why we need it:
Special notes for reviewers:
Additional information (if needed):
Fixed #122