Skip to content
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

deps(contrib/middleware/validate): update protovalidate-go to v0.9.2 #3572

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

DCjanus
Copy link
Contributor

@DCjanus DCjanus commented Mar 15, 2025

  • Bump buf.build/protovalidate and related packages to latest versions.
  • Refactor ProtoValidate middleware to directly use protovalidate for validation, removing legacy support code.

…lidate-go to v0.9.2

- Bump buf.build/protovalidate and related packages to latest versions.
- Refactor ProtoValidate middleware to directly use protovalidate for validation, removing legacy support code.
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Mar 15, 2025
DCjanus added 2 commits March 16, 2025 00:26
…ted protobuf messages

- Updated the `generate.go` file to include validation options in the protoc command.
- Bumped the versions of `protoc-gen-go` and `protoc` in `test.pb.go`.
- Introduced a new file `test.pb.validate.go` containing validation logic for protobuf messages.
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Mar 15, 2025
@DCjanus
Copy link
Contributor Author

DCjanus commented Mar 15, 2025

由于上游的 github.com/bufbuild/protovalidate-go 在 v0.9.x 版本移除了对 legacy 模式的支持,因此我们需要自行定义一个 Validator interface,进而手动调用。

@shenqidebaozi 好大哥帮忙瞅一眼

@kratos-ci-bot
Copy link
Collaborator

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Since the upstream github.com/bufbuild/protovalidate-go removes support for legacy mode in the v0.9.x version, we need to define a Validator interface by ourselves and then call it manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants