Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 34 additions & 15 deletions docs/openapiv2/apidocs.swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 14 additions & 11 deletions openfga/v1/openfga.proto
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,17 @@ message RelationshipCondition {
}

message TupleKey {
string object = 1 [
(validate.rules).string = {
pattern: "^[^\\s]{2,256}$",
ignore_empty: true
},
string user = 1 [
(google.api.field_behavior) = REQUIRED,
(validate.rules).string = {max_bytes: 512},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
max_length: 256,
example: "\"document:2021-budget\""
max_length: 512,
example: "\"user:anne\""
}
];

string relation = 2 [
(google.api.field_behavior) = REQUIRED,
(validate.rules).string = {
pattern: "^[^:#@\\s]{1,50}$",
ignore_empty: true
Expand All @@ -66,11 +65,15 @@ message TupleKey {
}
];

string user = 3 [
(validate.rules).string = {max_bytes: 512},
string object = 3 [
(google.api.field_behavior) = REQUIRED,
(validate.rules).string = {
pattern: "^[^\\s]{2,256}$",
ignore_empty: true
},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
max_length: 512,
example: "\"user:anne\""
max_length: 256,
example: "\"document:2021-budget\""
}
];

Expand Down
25 changes: 16 additions & 9 deletions openfga/v1/openfga_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,7 @@ message ReadResponse {

message WriteRequestTupleKey {
string user = 1 [
(google.api.field_behavior) = REQUIRED,
Comment thread
rhamzeh marked this conversation as resolved.
(validate.rules).string = {max_bytes: 512},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
max_length: 512,
Expand All @@ -867,6 +868,7 @@ message WriteRequestTupleKey {
];

string relation = 2 [
(google.api.field_behavior) = REQUIRED,
(validate.rules).string = {
pattern: "^[^:#@\\s]{1,50}$",
ignore_empty: true
Expand All @@ -878,6 +880,7 @@ message WriteRequestTupleKey {
];

string object = 3 [
(google.api.field_behavior) = REQUIRED,
(validate.rules).string = {
pattern: "^[^\\s]{2,256}$",
ignore_empty: true
Expand Down Expand Up @@ -962,6 +965,7 @@ message CheckRequest {

message CheckRequestTupleKey {
string user = 1 [
(google.api.field_behavior) = REQUIRED,
(validate.rules).string = {max_bytes: 512},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
max_length: 512,
Expand All @@ -970,6 +974,7 @@ message CheckRequestTupleKey {
];

string relation = 2 [
(google.api.field_behavior) = REQUIRED,
(validate.rules).string = {
pattern: "^[^:#@\\s]{1,50}$",
ignore_empty: true
Expand All @@ -981,6 +986,7 @@ message CheckRequestTupleKey {
];

string object = 3 [
(google.api.field_behavior) = REQUIRED,
(validate.rules).string = {
pattern: "^[^\\s]{2,256}$",
ignore_empty: true
Expand Down Expand Up @@ -1024,25 +1030,26 @@ message ExpandRequest {
}

message ExpandRequestTupleKey {
string object = 1 [
string relation = 1 [
(google.api.field_behavior) = REQUIRED,
(validate.rules).string = {
pattern: "^[^\\s]{2,256}$",
pattern: "^[^:#@\\s]{1,50}$",
ignore_empty: true
},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
max_length: 256,
example: "\"document:2021-budget\""
max_length: 50,
example: "\"reader\""
}
];

string relation = 2 [
string object = 2 [
(google.api.field_behavior) = REQUIRED,
(validate.rules).string = {
pattern: "^[^:#@\\s]{1,50}$",
pattern: "^[^\\s]{2,256}$",
ignore_empty: true
},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
max_length: 50,
example: "\"reader\""
max_length: 256,
example: "\"document:2021-budget\""
}
];
}
Expand Down
Loading