Skip to content

Change the regexes in the experimental API to prefix matches #103

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

Merged
merged 3 commits into from
May 6, 2024
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
11 changes: 11 additions & 0 deletions authzed/api/v1/error_reason.proto
Original file line number Diff line number Diff line change
Expand Up @@ -353,4 +353,15 @@ enum ErrorReason {
// "metadata": {}
// }
ERROR_REASON_INMEMORY_TOO_MANY_CONCURRENT_UPDATES = 24;

// The request failed because the precondition specified is empty.
//
// Example of an ErrorInfo:
//
// {
// "reason": "ERROR_REASON_EMPTY_PRECONDITION",
// "domain": "authzed.com",
// "metadata": {}
// }
ERROR_REASON_EMPTY_PRECONDITION = 25;
}
30 changes: 15 additions & 15 deletions authzed/api/v1/experimental_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@
// EXPERIMENTAL: DiffSchema is an API that allows clients to request the difference between the
// specified schema and the schema stored in SpiceDB. This is useful for clients that need to
// introspect the schema of a SpiceDB instance.
rpc ExperimentalSchemaDiff(ExperimentalSchemaDiffRequest)
returns (ExperimentalSchemaDiffResponse) {
rpc ExperimentalDiffSchema(ExperimentalDiffSchemaRequest)
returns (ExperimentalDiffSchemaResponse) {
option (google.api.http) = {
post: "/v1/experimental/schemadiff"
post: "/v1/experimental/diffschema"
body: "*"
};
}
Expand Down Expand Up @@ -209,17 +209,17 @@

// ExpSchemaFilter is a filter that can be applied to the schema on reflection.
message ExpSchemaFilter {
// optional_definition_name_match is a regex that is matched against the definition name.
string optional_definition_name_match = 1;
// optional_definition_name_filter is a prefix that is matched against the definition name.
string optional_definition_name_filter = 1;

Check failure on line 213 in authzed/api/v1/experimental_service.proto

View workflow job for this annotation

GitHub Actions / Lint & Publish Draft/Branch

Field "1" with name "optional_definition_name_filter" on message "ExpSchemaFilter" changed option "json_name" from "optionalDefinitionNameMatch" to "optionalDefinitionNameFilter".

Check failure on line 213 in authzed/api/v1/experimental_service.proto

View workflow job for this annotation

GitHub Actions / Lint & Publish Draft/Branch

Field "1" on message "ExpSchemaFilter" changed name from "optional_definition_name_match" to "optional_definition_name_filter".

// optional_caveat_name_match is a regex that is matched against the caveat name.
string optional_caveat_name_match = 2;
// optional_caveat_name_filter is a prefix that is matched against the caveat name.
string optional_caveat_name_filter = 2;

Check failure on line 216 in authzed/api/v1/experimental_service.proto

View workflow job for this annotation

GitHub Actions / Lint & Publish Draft/Branch

Field "2" with name "optional_caveat_name_filter" on message "ExpSchemaFilter" changed option "json_name" from "optionalCaveatNameMatch" to "optionalCaveatNameFilter".

Check failure on line 216 in authzed/api/v1/experimental_service.proto

View workflow job for this annotation

GitHub Actions / Lint & Publish Draft/Branch

Field "2" on message "ExpSchemaFilter" changed name from "optional_caveat_name_match" to "optional_caveat_name_filter".

// optional_relation_name_match is a regex that is matched against the relation name.
string optional_relation_name_match = 3;
// optional_relation_name_filter is a prefix that is matched against the relation name.
string optional_relation_name_filter = 3;

Check failure on line 219 in authzed/api/v1/experimental_service.proto

View workflow job for this annotation

GitHub Actions / Lint & Publish Draft/Branch

Field "3" with name "optional_relation_name_filter" on message "ExpSchemaFilter" changed option "json_name" from "optionalRelationNameMatch" to "optionalRelationNameFilter".

Check failure on line 219 in authzed/api/v1/experimental_service.proto

View workflow job for this annotation

GitHub Actions / Lint & Publish Draft/Branch

Field "3" on message "ExpSchemaFilter" changed name from "optional_relation_name_match" to "optional_relation_name_filter".

// optional_permission_name_match is a regex that is matched against the permission name.
string optional_permission_name_match = 4;
// optional_permission_name_filter is a prefix that is matched against the permission name.
string optional_permission_name_filter = 4;

Check failure on line 222 in authzed/api/v1/experimental_service.proto

View workflow job for this annotation

GitHub Actions / Lint & Publish Draft/Branch

Field "4" with name "optional_permission_name_filter" on message "ExpSchemaFilter" changed option "json_name" from "optionalPermissionNameMatch" to "optionalPermissionNameFilter".

Check failure on line 222 in authzed/api/v1/experimental_service.proto

View workflow job for this annotation

GitHub Actions / Lint & Publish Draft/Branch

Field "4" on message "ExpSchemaFilter" changed name from "optional_permission_name_match" to "optional_permission_name_filter".
}

// ExpDefinition is the representation of a definition in the schema.
Expand Down Expand Up @@ -298,10 +298,10 @@
Consistency consistency = 1;
repeated ExpRelationReference relations = 2;

// optional_definition_name_match is a regex that is matched against the definition name(s)
// optional_definition_name_match is a prefix that is matched against the definition name(s)
// for the permissions returned.
// If not specified, will be ignored.
string optional_definition_name_match = 3;
string optional_definition_name_filter = 3;

Check failure on line 304 in authzed/api/v1/experimental_service.proto

View workflow job for this annotation

GitHub Actions / Lint & Publish Draft/Branch

Field "3" with name "optional_definition_name_filter" on message "ExperimentalComputablePermissionsRequest" changed option "json_name" from "optionalDefinitionNameMatch" to "optionalDefinitionNameFilter".

Check failure on line 304 in authzed/api/v1/experimental_service.proto

View workflow job for this annotation

GitHub Actions / Lint & Publish Draft/Branch

Field "3" on message "ExperimentalComputablePermissionsRequest" changed name from "optional_definition_name_match" to "optional_definition_name_filter".
}

// ExpRelationReference is a reference to a relation in the schema.
Expand Down Expand Up @@ -335,12 +335,12 @@
ZedToken read_at = 2;
}

message ExperimentalSchemaDiffRequest {
message ExperimentalDiffSchemaRequest {
Consistency consistency = 1;
string comparison_schema = 2;
}

message ExperimentalSchemaDiffResponse {
message ExperimentalDiffSchemaResponse {
repeated ExpSchemaDiff diffs = 1;

// read_at is the ZedToken at which the schema was read.
Expand Down
Loading