Skip to content

Commit 610c433

Browse files
committed
Add additional comments to the experimental reflection APIs
1 parent 2619c6a commit 610c433

1 file changed

Lines changed: 23 additions & 1 deletion

File tree

authzed/api/v1/experimental_service.proto

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ message ExperimentalReflectSchemaResponse {
207207
ZedToken read_at = 3;
208208
}
209209

210+
// ExpSchemaFilter is a filter that can be applied to the schema on reflection.
210211
message ExpSchemaFilter {
211212
// optional_definition_name_match is a regex that is matched against the definition name.
212213
string optional_definition_name_match = 1;
@@ -221,35 +222,49 @@ message ExpSchemaFilter {
221222
string optional_permission_name_match = 4;
222223
}
223224

225+
// ExpDefinition is the representation of a definition in the schema.
224226
message ExpDefinition {
225227
string name = 1;
228+
229+
// comment is a human-readable comments on the definition. Will include
230+
// delimiter characters.
226231
string comment = 2;
227232

228233
repeated ExpRelation relations = 3;
229234
repeated ExpPermission permissions = 4;
230235
}
231236

237+
// ExpCaveat is the representation of a caveat in the schema.
232238
message ExpCaveat {
233239
string name = 1;
240+
241+
// comment is a human-readable comments on the caveat. Will include
242+
// delimiter characters.
234243
string comment = 2;
235244

236245
repeated ExpCaveatParameter parameters = 3;
237246
string expression = 4;
238247
}
239248

249+
// ExpCaveatParameter is the representation of a parameter in a caveat.
240250
message ExpCaveatParameter {
241251
string name = 1;
252+
253+
// type is the type of the parameter. Will be a string representing the
254+
// type, e.g. `int` or `list<string>`
242255
string type = 2;
243256
string parent_caveat_name = 3;
244257
}
245258

259+
// ExpRelation is the representation of a relation in the schema.
246260
message ExpRelation {
247261
string name = 1;
248262
string comment = 2;
249263
string parent_definition_name = 3;
250264
repeated ExpTypeReference subject_types = 4;
251265
}
252266

267+
// ExpTypeReference is the representation of a type reference in the schema.
253268
message ExpTypeReference {
254269
// subject_definition_name is the name of the subject's definition.
255270
string subject_definition_name = 1;
@@ -269,8 +284,12 @@ message ExpTypeReference {
269284
}
270285
}
271286

287+
// ExpPermission is the representation of a permission in the schema.
272288
message ExpPermission {
273289
string name = 1;
290+
291+
// comment is a human-readable comments on the permission. Will include
292+
// delimiter characters.
274293
string comment = 2;
275294
string parent_definition_name = 3;
276295
}
@@ -285,14 +304,16 @@ message ExperimentalComputablePermissionsRequest {
285304
string optional_definition_name_match = 3;
286305
}
287306

307+
// ExpRelationReference is a reference to a relation in the schema.
288308
message ExpRelationReference {
289309
string definition_name = 1;
290310
string relation_name = 2;
291311
}
292312

313+
// ExpPermissionReference is a reference to a permission in the schema.
293314
message ExpPermissionReference {
294315
string definition_name = 1;
295-
string relation_name = 2;
316+
string permission_name = 2;
296317
}
297318

298319
message ExperimentalComputablePermissionsResponse {
@@ -336,6 +357,7 @@ message ExpCaveatParameterTypeChange {
336357
string previous_type = 2;
337358
}
338359

360+
// ExpSchemaDiff is the representation of a diff between two schemas.
339361
message ExpSchemaDiff {
340362
oneof diff {
341363
ExpDefinition definition_added = 1;

0 commit comments

Comments
 (0)