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

feat: add query consistency params #180

Merged
merged 6 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from 5 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
35 changes: 35 additions & 0 deletions docs/openapiv2/apidocs.swagger.json

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

30 changes: 15 additions & 15 deletions openfga/v1/authzmodel.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ message AuthorizationModel {
string id = 1 [
(google.api.field_behavior) = REQUIRED,
(validate.rules).string = {
pattern: "^[ABCDEFGHJKMNPQRSTVWXYZ0-9]{26}$",
pattern: "^[ABCDEFGHJKMNPQRSTVWXYZ0-9]{26}$"
jpadilla marked this conversation as resolved.
Show resolved Hide resolved
ignore_empty: false
},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "\"01G5JAVJ41T49E9TT3SKVS7X1J\""}
Expand All @@ -19,7 +19,7 @@ message AuthorizationModel {
string schema_version = 2 [
(google.api.field_behavior) = REQUIRED,
(validate.rules).string = {
pattern: "^[1-9].[1-9]$",
pattern: "^[1-9].[1-9]$"
ignore_empty: false
},
json_name = "schema_version"
Expand All @@ -35,7 +35,7 @@ message AuthorizationModel {
json_name = "conditions",
(validate.rules).map.max_pairs = 25,
(validate.rules).map.keys.string = {
pattern: "^[^:#@\\s]{1,50}$",
pattern: "^[^:#@\\s]{1,50}$"
ignore_empty: false
}
];
Expand All @@ -44,7 +44,7 @@ message AuthorizationModel {
message TypeDefinition {
string type = 1 [
(validate.rules).string = {
pattern: "^[^:#@\\s]{1,254}$",
pattern: "^[^:#@\\s]{1,254}$"
ignore_empty: false
},
(google.api.field_behavior) = REQUIRED,
Expand All @@ -64,7 +64,7 @@ message TypeDefinition {

message Relation {
string name = 1 [(validate.rules).string = {
pattern: "^[^:#@\\s]{1,50}$",
pattern: "^[^:#@\\s]{1,50}$"
ignore_empty: false
}];

Expand All @@ -84,7 +84,7 @@ message Metadata {
map<string, RelationMetadata> relations = 1;

string module = 2 [(validate.rules).string = {
pattern: "^[^:#@\\s]{1,50}$",
pattern: "^[^:#@\\s]{1,50}$"
ignore_empty: true
}];

Expand All @@ -93,7 +93,7 @@ message Metadata {

message SourceInfo {
string file = 1 [(validate.rules).string = {
pattern: "^[a-zA-Z0-9_\\-\\/]{1,100}\\.fga$",
pattern: "^[a-zA-Z0-9_\\-\\/]{1,100}\\.fga$"
ignore_empty: true
}];
}
Expand All @@ -102,7 +102,7 @@ message RelationMetadata {
repeated RelationReference directly_related_user_types = 1 [json_name = "directly_related_user_types"];

string module = 2 [(validate.rules).string = {
pattern: "^[^:#@\\s]{1,50}$",
pattern: "^[^:#@\\s]{1,50}$"
ignore_empty: true
}];

Expand All @@ -113,7 +113,7 @@ message RelationMetadata {
message RelationReference {
string type = 1 [
(validate.rules).string = {
pattern: "^[^:#@\\s]{1,254}$",
pattern: "^[^:#@\\s]{1,254}$"
ignore_empty: false
},
(google.api.field_behavior) = REQUIRED,
Expand All @@ -123,7 +123,7 @@ message RelationReference {
oneof relation_or_wildcard {
string relation = 2 [
(validate.rules).string = {
pattern: "^[^:#@\\s]{1,50}$",
pattern: "^[^:#@\\s]{1,50}$"
ignore_empty: true
},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "\"member\""}
Expand All @@ -134,7 +134,7 @@ message RelationReference {

// The name of a condition that is enforced over the allowed relation.
string condition = 4 [(validate.rules).string = {
pattern: "^[^:#@\\s]{1,50}$",
pattern: "^[^:#@\\s]{1,50}$"
ignore_empty: true
}];
}
Expand Down Expand Up @@ -181,7 +181,7 @@ message ComputedUserset {
string relation = 1 [
(google.api.field_behavior) = REQUIRED,
(validate.rules).string = {
max_bytes: 50,
max_bytes: 50
ignore_empty: false
}
];
Expand All @@ -204,7 +204,7 @@ message Condition {
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(validate.rules).string = {
pattern: "^[^:#@\\s]{1,50}$",
pattern: "^[^:#@\\s]{1,50}$"
ignore_empty: false
}
];
Expand All @@ -213,7 +213,7 @@ message Condition {
string expression = 2 [
(google.api.field_behavior) = REQUIRED,
(validate.rules).string = {
max_bytes: 512,
max_bytes: 512
ignore_empty: false
}
];
Expand All @@ -229,7 +229,7 @@ message Condition {

message ConditionMetadata {
string module = 1 [(validate.rules).string = {
pattern: "^[^:#@\\s]{1,50}$",
pattern: "^[^:#@\\s]{1,50}$"
ignore_empty: true
}];

Expand Down
28 changes: 14 additions & 14 deletions openfga/v1/openapi.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@ import "protoc-gen-openapiv2/options/annotations.proto";

option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
info: {
title: "OpenFGA";
description: "A high performance and flexible authorization/permission engine built for developers and inspired by Google Zanzibar.";
version: "1.x";
title: "OpenFGA"
description: "A high performance and flexible authorization/permission engine built for developers and inspired by Google Zanzibar."
version: "1.x"
contact: {
name: "OpenFGA";
email: "[email protected]";
url: "https://openfga.dev";
};
name: "OpenFGA"
email: "[email protected]"
url: "https://openfga.dev"
}
license: {
name: "Apache-2.0";
url: "https://github.com/openfga/openfga/blob/main/LICENSE";
};
};
consumes: "application/json";
produces: "application/json";
schemes: HTTPS;
name: "Apache-2.0"
url: "https://github.com/openfga/openfga/blob/main/LICENSE"
}
}
consumes: "application/json"
produces: "application/json"
schemes: HTTPS
responses: {
key: "400"
value: {
Expand Down
Loading
Loading