Generate validation code
Use a local validation plugin with EasyP v1.
If your .proto files import validation annotations, add the Git module that provides those imports to protobuf.mod. The plugin runs through easyp.gen.yaml:
version: v1
generate:
modules: [github.com/acme/contracts]
plugins:
- name: go
out: ./gen/go
opts:
paths: source_relative
- name: validate
out: ./gen/go
opts:
lang: goInstall protoc-gen-go and protoc-gen-validate on PATH, then run:
easyp mod tidy
easyp generateeasyp mod tidy pins the schema dependency in protobuf.lock; the generator resolves its imports from that lock. The version of the local plugin is selected by the executable on PATH.