Skip to content

Commit

Permalink
fix: remove email validation for SearchUsers v2beta/users (#7855)
Browse files Browse the repository at this point in the history
fix: remove email validation + homogeneous requirements
  • Loading branch information
doncicuto committed Apr 26, 2024
1 parent 4f3564e commit 2254434
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion proto/zitadel/member.proto
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ message EmailQuery {
string email = 1 [
(validate.rules).string = {max_len: 200},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "email address of the user. (spec: https://tools.ietf.org/html/rfc2822#section-3.4.1)"
description: "email address of the user"
max_length: 200;
example: "\"gigi@zitadel.com\"";
}
Expand Down
2 changes: 1 addition & 1 deletion proto/zitadel/user.proto
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ message EmailQuery {
string email_address = 1 [
(validate.rules).string = {max_len: 200},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "email address of the user. (spec: https://tools.ietf.org/html/rfc2822#section-3.4.1)"
description: "email address of the user"
max_length: 200;
example: "\"gigi@zitadel.com\"";
}
Expand Down
5 changes: 2 additions & 3 deletions proto/zitadel/user/v2beta/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,10 @@ message DisplayNameQuery {
// Query for users with a specific email.
message EmailQuery {
string email_address = 1 [
(validate.rules).string = {min_len: 1, max_len: 200, email: true},
(validate.rules).string = {max_len: 200},
(google.api.field_behavior) = REQUIRED,
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "email address of the user. (spec: https://tools.ietf.org/html/rfc2822#section-3.4.1)"
min_length: 1;
description: "email address of the user"
max_length: 200;
example: "\"gigi@zitadel.com\"";
}
Expand Down
4 changes: 2 additions & 2 deletions proto/zitadel/user/v3alpha/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,10 @@ message UsernameQuery {
message EmailQuery {
// Defines the email of the user to query for.
string address = 1 [
(validate.rules).string = {min_len: 1, max_len: 200},
(validate.rules).string = {max_len: 200},
(google.api.field_behavior) = REQUIRED,
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
min_length: 1;
description: "email address of the user"
max_length: 200;
example: "\"gigi@zitadel.com\"";
}
Expand Down

0 comments on commit 2254434

Please sign in to comment.