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
I have tried to run protolinter on the proto files with swagger annotations, but itseems to break the linter with below error:
found ""max_length"(Token=2, Pos=..\protos\test.proto:179:5)" but expected [}] at C:/Users/uname/go/src/github.com/yoheimuta/go-protoparser/parser/field.go:243:found "ma
x_length" but expected at C:/Users/uname/go/src/github.com/yoheimuta/go-protoparser/internal/lexer/emptyStatement.go:16
I have tried to run protolinter on the proto files with swagger annotations, but itseems to break the linter with below error:
found ""max_length"(Token=2, Pos=..\protos\test.proto:179:5)" but expected [}] at C:/Users/uname/go/src/github.com/yoheimuta/go-protoparser/parser/field.go:243:found "ma
x_length" but expected at C:/Users/uname/go/src/github.com/yoheimuta/go-protoparser/internal/lexer/emptyStatement.go:16
Below is a sample proto message with annotations:
message UserCredentials {
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_schema) = {
example: { value: '{ "email_id": "user@domain.com", "password": "password@123"}' }
};
string email_id = 1[(grpc.gateway.protoc_gen_swagger.options.openapiv2_field) = {
pattern: "^-!#$%&'*+\/0-9=?A-Z^_a-z{|}~@a-zA-Z0-9\.a-zA-Z+$"
max_length: 254
min_length: 1
description: "Enter user email"
}];
string password = 2[(grpc.gateway.protoc_gen_swagger.options.openapiv2_field) = {
description: "Enter user password"
}];
}
The text was updated successfully, but these errors were encountered: