Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: contextual tuples use WriteRequestTupleKey #101

Closed
Closed
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
2 changes: 1 addition & 1 deletion docs/openapiv2/apidocs.swagger.json

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

39 changes: 38 additions & 1 deletion openfga/v1/openfga.proto
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
}

message TupleKey {
string user = 1 [

Check failure on line 47 in openfga/v1/openfga.proto

View workflow job for this annotation

GitHub Actions / build

Field "1" with name "user" on message "TupleKey" changed option "json_name" from "object" to "user".

Check failure on line 47 in openfga/v1/openfga.proto

View workflow job for this annotation

GitHub Actions / build

Field "1" on message "TupleKey" changed name from "object" to "user".
(google.api.field_behavior) = REQUIRED,
(validate.rules).string = {max_bytes: 512},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
Expand All @@ -65,7 +65,7 @@
}
];

string object = 3 [

Check failure on line 68 in openfga/v1/openfga.proto

View workflow job for this annotation

GitHub Actions / build

Field "3" with name "object" on message "TupleKey" changed option "json_name" from "user" to "object".

Check failure on line 68 in openfga/v1/openfga.proto

View workflow job for this annotation

GitHub Actions / build

Field "3" on message "TupleKey" changed name from "user" to "object".
(google.api.field_behavior) = REQUIRED,
(validate.rules).string = {
pattern: "^[^\\s]{2,256}$",
Expand Down Expand Up @@ -94,8 +94,45 @@
];
}

message WriteRequestTupleKey {
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,
example: "\"user:anne\""
}
];

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

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: 256,
example: "\"document:2021-budget\""
}
];

RelationshipCondition condition = 4;
}

message ContextualTupleKeys {
repeated TupleKey tuple_keys = 1 [
repeated WriteRequestTupleKey tuple_keys = 1 [

Check failure on line 135 in openfga/v1/openfga.proto

View workflow job for this annotation

GitHub Actions / build

Field "1" on message "ContextualTupleKeys" changed type from "openfga.v1.TupleKey" to "openfga.v1.WriteRequestTupleKey".
json_name = "tuple_keys",
(google.api.field_behavior) = REQUIRED,
(validate.rules).repeated.max_items = 10,
Expand Down
37 changes: 0 additions & 37 deletions openfga/v1/openfga_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "\"01YCP46JKYM8FJCQ37NMBYHE5X\""}
];

ReadRequestTupleKey tuple_key = 2 [json_name = "tuple_key"];

Check failure on line 797 in openfga/v1/openfga_service.proto

View workflow job for this annotation

GitHub Actions / build

Field "2" on message "ReadRequest" changed type from "openfga.v1.TupleKey" to "openfga.v1.ReadRequestTupleKey".

google.protobuf.Int32Value page_size = 3 [
json_name = "page_size",
Expand Down Expand Up @@ -857,43 +857,6 @@
];
}

message WriteRequestTupleKey {
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,
example: "\"user:anne\""
}
];

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

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: 256,
example: "\"document:2021-budget\""
}
];

RelationshipCondition condition = 4;
}

message WriteRequestTupleKeys {
repeated WriteRequestTupleKey tuple_keys = 1 [
json_name = "tuple_keys",
Expand All @@ -911,9 +874,9 @@
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "\"01YCP46JKYM8FJCQ37NMBYHE5X\""}
];

WriteRequestTupleKeys writes = 2;

Check failure on line 877 in openfga/v1/openfga_service.proto

View workflow job for this annotation

GitHub Actions / build

Field "2" on message "WriteRequest" changed type from "openfga.v1.TupleKeys" to "openfga.v1.WriteRequestTupleKeys".

WriteRequestTupleKeys deletes = 3;

Check failure on line 879 in openfga/v1/openfga_service.proto

View workflow job for this annotation

GitHub Actions / build

Field "3" on message "WriteRequest" changed type from "openfga.v1.TupleKeys" to "openfga.v1.WriteRequestTupleKeys".

string authorization_model_id = 4 [
json_name = "authorization_model_id",
Expand Down
Loading
Loading