-
Notifications
You must be signed in to change notification settings - Fork 56
Closed
Labels
FeatureNew feature or requestNew feature or request
Description
Feature description:
I would be happy if cel expression validation is supported.
Problem it solves or use case:
When I buf lint the following proto, the second mistake is caught by buf lint proto/xxx/greeting/v1/greeting.proto:35:79:field xxx.greeting.v1.SayHelloResponse.request_time: option (buf.validate.field).timestamp.lt_nowwww: field lt_nowwww of buf.validate.TimestampRules does not exist, but the first one (cel expression) is not. I'd like to know if the expression is valid or not.
message SayHelloResponse {
string message_id = 1;
string message = 2 [(buf.validate.field).cel = {
id: "sayHelloResponse.message",
message: "message must start with 'Hello, ' and shorter than 1024",
expression: "(this.startsWith('Hello, ') && this.string.max_lennnn "
}];
google.protobuf.Timestamp request_time = 3 [(buf.validate.field).timestamp.lt_nowwwwwww = true];
}Proposed implementation or solution:
Is it possible to validate expression like other tools like linting IAM condition that checks cel validity?
https://cloud.google.com/iam/docs/linting-policies
Contribution:
Examples or references:
Additional context:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
FeatureNew feature or requestNew feature or request