-
Notifications
You must be signed in to change notification settings - Fork 46
cyclic import between validator and model packages #151
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
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@spolti is this still valid? |
I am not sure, need to revisit it. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@ribeiromiranda Hi, it seems that your last PR is going to address this problem, can you please confirm? |
@spolti Yes. Solve this problem. |
What would you like to be added:
Custom Structs, to be validated, needs to be registered in the validator in order to get executed.
Example:
To get this validated, there is a need to register the custom struct here:
https://github.com/serverlessworkflow/sdk-go/blob/main/validator/validator.go#L28
Something similar to https://raw.githubusercontent.com/go-playground/validator/master/_examples/custom/main.go
But, the way that the packges are structured, it will lead to a cyclic import error:
Why is this needed:
Allow custom structs to be validated.
The text was updated successfully, but these errors were encountered: