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
configloader has been refactored, as can be seen in #655. So some of the links above are no longer valid, but don't worry, the configloader is now much more readable and you can easily find where the validation logic is in this package. Please don't worry, feel free to leave a comment and let us know if you encounter any problems.
What would you like to add? Why is this needed?
Background
Our community member @iyear introduced https://github.com/go-playground/validator into the project in this issue #511 (solved by this PR #533). This has greatly improved our plugin options validation.
However, the
configloader
module still uses manual validation: https://github.com/devstream-io/devstream/blob/main/internal/pkg/configloader/validation.goImprovement
We can update the configloader's validation method to use the same validator mechanism.
It's worth noting that the logic here https://github.com/devstream-io/devstream/blob/main/internal/pkg/configloader/validation.go#L93 is a little complicated; we can implement it by something like this https://github.com/iyear/devstream/blob/9ec0591cc9a3b609b0d302d16cd6246c6119c606/internal/pkg/plugin/common/reposcaffolding/options.go#L11.
The text was updated successfully, but these errors were encountered: