Skip to content

Commit 09cc071

Browse files
Forward the input image resolver to protovalidate so it can support predefined rule (#4357)
1 parent 04dcaf3 commit 09cc071

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

private/buf/bufctl/controller.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,9 @@ func (c *controller) GetMessage(
751751
}
752752
var validator protoyaml.Validator
753753
if functionOptions.messageValidation {
754-
protovalidateValidator, err := protovalidate.New()
754+
protovalidateValidator, err := protovalidate.New(
755+
protovalidate.WithExtensionTypeResolver(schemaImage.Resolver()),
756+
)
755757
if err != nil {
756758
return nil, 0, err
757759
}

0 commit comments

Comments
 (0)