Skip to content

Commit

Permalink
fix regex pattern to allow empty continuation token
Browse files Browse the repository at this point in the history
  • Loading branch information
justincoh committed Dec 30, 2024
1 parent 5a31485 commit eb55c78
Show file tree
Hide file tree
Showing 3 changed files with 2,426 additions and 2,424 deletions.
16 changes: 8 additions & 8 deletions openfga/v1/openfga_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,7 @@ message ReadRequest {
string continuation_token = 4 [
json_name = "continuation_token",
(validate.rules).string.max_bytes = 5120,
(validate.rules).string.pattern = "^[A-Za-z0-9-_]+={0,2}$",
(validate.rules).string.pattern = "^$|^[A-Za-z0-9-_]+={0,2}$",
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "\"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\""}
];

Expand Down Expand Up @@ -1227,7 +1227,7 @@ message ReadResponse {
json_name = "continuation_token",
(google.api.field_behavior) = REQUIRED,
(validate.rules).string.max_bytes = 5120,
(validate.rules).string.pattern = "^[A-Za-z0-9-_]+={0,2}$",
(validate.rules).string.pattern = "^$|^[A-Za-z0-9-_]+={0,2}$",
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "The continuation token will be empty if there are no more tuples."
example: "\"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\""
Expand Down Expand Up @@ -1561,7 +1561,7 @@ message ReadAuthorizationModelsRequest {
string continuation_token = 3 [
json_name = "continuation_token",
(validate.rules).string.max_bytes = 5120,
(validate.rules).string.pattern = "^[A-Za-z0-9-_]+={0,2}$",
(validate.rules).string.pattern = "^$|^[A-Za-z0-9-_]+={0,2}$",
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "\"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\""}
];
}
Expand All @@ -1575,7 +1575,7 @@ message ReadAuthorizationModelsResponse {
string continuation_token = 2 [
json_name = "continuation_token",
(validate.rules).string.max_bytes = 5120,
(validate.rules).string.pattern = "^[A-Za-z0-9-_]+={0,2}$",
(validate.rules).string.pattern = "^$|^[A-Za-z0-9-_]+={0,2}$",
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "The continuation token will be empty if there are no more models."
example: "\"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\""
Expand Down Expand Up @@ -1666,7 +1666,7 @@ message ReadChangesRequest {
string continuation_token = 4 [
json_name = "continuation_token",
(validate.rules).string.max_bytes = 5120,
(validate.rules).string.pattern = "^[A-Za-z0-9-_]+={0,2}$",
(validate.rules).string.pattern = "^$|^[A-Za-z0-9-_]+={0,2}$",
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "\"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\""}
];

Expand All @@ -1689,7 +1689,7 @@ message ReadChangesResponse {
string continuation_token = 2 [
json_name = "continuation_token",
(validate.rules).string.max_bytes = 5120,
(validate.rules).string.pattern = "^[A-Za-z0-9-_]+={0,2}$",
(validate.rules).string.pattern = "^$|^[A-Za-z0-9-_]+={0,2}$",
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "The continuation token will be identical if there are no new changes."
example: "\"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\""
Expand Down Expand Up @@ -1800,7 +1800,7 @@ message ListStoresRequest {
string continuation_token = 2 [
json_name = "continuation_token",
(validate.rules).string.max_bytes = 5120,
(validate.rules).string.pattern = "^[A-Za-z0-9-_]+={0,2}$",
(validate.rules).string.pattern = "^$|^$|^[A-Za-z0-9-_]+={0,2}$",
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "\"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\""}
];

Expand All @@ -1825,7 +1825,7 @@ message ListStoresResponse {
json_name = "continuation_token",
(google.api.field_behavior) = REQUIRED,
(validate.rules).string.max_bytes = 5120,
(validate.rules).string.pattern = "^[A-Za-z0-9-_]+={0,2}$",
(validate.rules).string.pattern = "^$|^[A-Za-z0-9-_]+={0,2}$",
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "The continuation token will be empty if there are no more stores."
example: "\"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\""
Expand Down
Loading

0 comments on commit eb55c78

Please sign in to comment.