Skip to content

Commit aa9a74c

Browse files
authored
Merge pull request #103 from josephschorr/remove-exp-regexes
Change the regexes in the experimental API to prefix matches
2 parents 8e9616c + eb84316 commit aa9a74c

2 files changed

Lines changed: 26 additions & 15 deletions

File tree

authzed/api/v1/error_reason.proto

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,4 +353,15 @@ enum ErrorReason {
353353
// "metadata": {}
354354
// }
355355
ERROR_REASON_INMEMORY_TOO_MANY_CONCURRENT_UPDATES = 24;
356+
357+
// The request failed because the precondition specified is empty.
358+
//
359+
// Example of an ErrorInfo:
360+
//
361+
// {
362+
// "reason": "ERROR_REASON_EMPTY_PRECONDITION",
363+
// "domain": "authzed.com",
364+
// "metadata": {}
365+
// }
366+
ERROR_REASON_EMPTY_PRECONDITION = 25;
356367
}

authzed/api/v1/experimental_service.proto

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ service ExperimentalService {
9292
// EXPERIMENTAL: DiffSchema is an API that allows clients to request the difference between the
9393
// specified schema and the schema stored in SpiceDB. This is useful for clients that need to
9494
// introspect the schema of a SpiceDB instance.
95-
rpc ExperimentalSchemaDiff(ExperimentalSchemaDiffRequest)
96-
returns (ExperimentalSchemaDiffResponse) {
95+
rpc ExperimentalDiffSchema(ExperimentalDiffSchemaRequest)
96+
returns (ExperimentalDiffSchemaResponse) {
9797
option (google.api.http) = {
98-
post: "/v1/experimental/schemadiff"
98+
post: "/v1/experimental/diffschema"
9999
body: "*"
100100
};
101101
}
@@ -209,17 +209,17 @@ message ExperimentalReflectSchemaResponse {
209209

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

215-
// optional_caveat_name_match is a regex that is matched against the caveat name.
216-
string optional_caveat_name_match = 2;
215+
// optional_caveat_name_filter is a prefix that is matched against the caveat name.
216+
string optional_caveat_name_filter = 2;
217217

218-
// optional_relation_name_match is a regex that is matched against the relation name.
219-
string optional_relation_name_match = 3;
218+
// optional_relation_name_filter is a prefix that is matched against the relation name.
219+
string optional_relation_name_filter = 3;
220220

221-
// optional_permission_name_match is a regex that is matched against the permission name.
222-
string optional_permission_name_match = 4;
221+
// optional_permission_name_filter is a prefix that is matched against the permission name.
222+
string optional_permission_name_filter = 4;
223223
}
224224

225225
// ExpDefinition is the representation of a definition in the schema.
@@ -298,10 +298,10 @@ message ExperimentalComputablePermissionsRequest {
298298
Consistency consistency = 1;
299299
repeated ExpRelationReference relations = 2;
300300

301-
// optional_definition_name_match is a regex that is matched against the definition name(s)
301+
// optional_definition_name_match is a prefix that is matched against the definition name(s)
302302
// for the permissions returned.
303303
// If not specified, will be ignored.
304-
string optional_definition_name_match = 3;
304+
string optional_definition_name_filter = 3;
305305
}
306306

307307
// ExpRelationReference is a reference to a relation in the schema.
@@ -335,12 +335,12 @@ message ExperimentalDependentRelationsResponse {
335335
ZedToken read_at = 2;
336336
}
337337

338-
message ExperimentalSchemaDiffRequest {
338+
message ExperimentalDiffSchemaRequest {
339339
Consistency consistency = 1;
340340
string comparison_schema = 2;
341341
}
342342

343-
message ExperimentalSchemaDiffResponse {
343+
message ExperimentalDiffSchemaResponse {
344344
repeated ExpSchemaDiff diffs = 1;
345345

346346
// read_at is the ZedToken at which the schema was read.

0 commit comments

Comments
 (0)