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
Copy file name to clipboardExpand all lines: cmd/buf/buf_test.go
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -3020,7 +3020,7 @@ testdata/check_plugins/current/proto/api/v1/service.proto:17:14:RPC request type
3020
3020
testdata/check_plugins/current/proto/api/v1/service.proto:17:42:RPC response type "GetFooTestResponse" should be named "GetFooResponse" or "FooServiceTestGetFooResponse".
3021
3021
testdata/check_plugins/current/proto/api/v1/service.proto:26:1:"ListFooResponse" is a pagination response without a page token field named "page_token" (buf-plugin-rpc-ext)
3022
3022
testdata/check_plugins/current/proto/common/v1alpha1/messages.proto:16:5:field "common.v1alpha1.Four.FourTwo.id" does not have rule (buf.validate.field).string.tuuid set (buf-plugin-protovalidate-ext)
3023
-
testdata/check_plugins/current/vendor/protovalidate/buf/validate/validate.proto:94:3:field "buf.validate.Rule.id" does not have rule (buf.validate.field).string.tuuid set (buf-plugin-protovalidate-ext)
3023
+
testdata/check_plugins/current/vendor/protovalidate/buf/validate/validate.proto:95:3:field "buf.validate.Rule.id" does not have rule (buf.validate.field).string.tuuid set (buf-plugin-protovalidate-ext)
@@ -3046,7 +3046,7 @@ testdata/check_plugins/current/proto/api/v1/service.proto:17:14:RPC request type
3046
3046
testdata/check_plugins/current/proto/api/v1/service.proto:17:42:RPC response type "GetFooTestResponse" should be named "GetFooResponse" or "FooServiceTestGetFooResponse".
3047
3047
testdata/check_plugins/current/proto/api/v1/service.proto:26:1:"ListFooResponse" is a pagination response without a page token field named "page_token" (buf-plugin-rpc-ext)
3048
3048
testdata/check_plugins/current/proto/common/v1alpha1/messages.proto:16:5:field "common.v1alpha1.Four.FourTwo.id" does not have rule (buf.validate.field).string.tuuid set (buf-plugin-protovalidate-ext)
3049
-
testdata/check_plugins/current/vendor/protovalidate/buf/validate/validate.proto:94:3:field "buf.validate.Rule.id" does not have rule (buf.validate.field).string.tuuid set (buf-plugin-protovalidate-ext)
3049
+
testdata/check_plugins/current/vendor/protovalidate/buf/validate/validate.proto:95:3:field "buf.validate.Rule.id" does not have rule (buf.validate.field).string.tuuid set (buf-plugin-protovalidate-ext)
testdata/check_plugins/current/proto/api/v1/service.proto:11:1:Service name "api.v1.FooServiceMock" has banned suffix "Mock". (buf-plugin-suffix)
3098
3098
testdata/check_plugins/current/proto/common/v1alpha1/messages.proto:16:5:field "common.v1alpha1.Four.FourTwo.id" does not have rule (buf.validate.field).string.tuuid set (buf-plugin-protovalidate-ext)
3099
-
testdata/check_plugins/current/vendor/protovalidate/buf/validate/validate.proto:94:3:field "buf.validate.Rule.id" does not have rule (buf.validate.field).string.tuuid set (buf-plugin-protovalidate-ext)
3099
+
testdata/check_plugins/current/vendor/protovalidate/buf/validate/validate.proto:95:3:field "buf.validate.Rule.id" does not have rule (buf.validate.field).string.tuuid set (buf-plugin-protovalidate-ext)
// // The `value` FieldMask must only contain paths listed in `in`.
4721
+
// google.protobuf.FieldMask value = 1 [(buf.validate.field).field_mask = {
4722
+
// in: ["a", "b", "c.a"]
4723
+
// }];
4724
+
// }
4725
+
// ```
4726
+
repeatedstringin=2 [(predefined).cel = {
4727
+
id: "field_mask.in"
4728
+
expression: "!this.paths.all(p, p in getField(rules, 'in') || getField(rules, 'in').exists(f, p.startsWith(f+'.'))) ? 'value must only contain paths in %s'.format([getField(rules, 'in')]) : ''"
4729
+
}];
4730
+
4731
+
// `not_in` requires the field value to not contain paths matching specified
4732
+
// values or their subpaths.
4733
+
// If any of the field value's paths matches the rule,
// // The `value` FieldMask shall not contain paths listed in `not_in`.
4740
+
// google.protobuf.FieldMask value = 1 [(buf.validate.field).field_mask = {
4741
+
// not_in: ["forbidden", "immutable", "c.a"]
4742
+
// }];
4743
+
// }
4744
+
// ```
4745
+
repeatedstringnot_in=3 [(predefined).cel = {
4746
+
id: "field_mask.not_in"
4747
+
expression: "!this.paths.all(p, !(p in getField(rules, 'not_in') || getField(rules, 'not_in').exists(f, p.startsWith(f+'.')))) ? 'value must not contain any paths in %s'.format([getField(rules, 'not_in')]) : ''"
4748
+
}];
4749
+
4750
+
// `example` specifies values that the field may have. These values SHOULD
4751
+
// conform to other rules. `example` values will not impact validation
4752
+
// but may be used as helpful guidance on how to populate the given field.
// TimestampRules describe the rules applied exclusively to the `google.protobuf.Timestamp` well-known type.
4609
4781
messageTimestampRules {
4610
4782
// `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated.
0 commit comments