Skip to content

Commit

Permalink
Merge pull request #194 from josephschorr/exp-reflect-api-update-3
Browse files Browse the repository at this point in the history
Further updates to experimental reflection APIs
  • Loading branch information
josephschorr committed May 6, 2024
2 parents 8bb998a + 6e64a93 commit 1e5f214
Show file tree
Hide file tree
Showing 11 changed files with 671 additions and 656 deletions.
2 changes: 1 addition & 1 deletion magefiles/gen.go
Expand Up @@ -24,7 +24,7 @@ func (g Gen) All() error {
const (
ProtoPath = "proto/authzed/api"
BufRepository = "buf.build/authzed/api"
BufTag = "8e9616c4e4cb940cfd70fe5c2c4e2888d0e8a765"
BufTag = "aa9a74cba13a9e97c419bb5b9c8ef7c0cc7eb13e"
)

// Proto runs proto codegen
Expand Down
140 changes: 70 additions & 70 deletions proto/apidocs.swagger.json
Expand Up @@ -45,6 +45,39 @@
"application/json"
],
"paths": {
"/v1/experimental/diffschema": {
"post": {
"summary": "EXPERIMENTAL: DiffSchema is an API that allows clients to request the difference between the\nspecified schema and the schema stored in SpiceDB. This is useful for clients that need to\nintrospect the schema of a SpiceDB instance.",
"operationId": "ExperimentalService_ExperimentalDiffSchema",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1ExperimentalDiffSchemaResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1ExperimentalDiffSchemaRequest"
}
}
],
"tags": [
"ExperimentalService"
]
}
},
"/v1/experimental/permissions/bulkcheckpermission": {
"post": {
"summary": "NOTE: BulkCheckPermission has been promoted to the stable API as \"CheckBulkPermission\" and the\nAPI will be removed from experimental in a future release.",
Expand Down Expand Up @@ -256,39 +289,6 @@
]
}
},
"/v1/experimental/schemadiff": {
"post": {
"summary": "EXPERIMENTAL: DiffSchema is an API that allows clients to request the difference between the\nspecified schema and the schema stored in SpiceDB. This is useful for clients that need to\nintrospect the schema of a SpiceDB instance.",
"operationId": "ExperimentalService_ExperimentalSchemaDiff",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1ExperimentalSchemaDiffResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1ExperimentalSchemaDiffRequest"
}
}
],
"tags": [
"ExperimentalService"
]
}
},
"/v1/permissions/check": {
"post": {
"summary": "CheckPermission determines for a given resource whether a subject computes\nto having a permission or is a direct member of a particular relation.",
Expand Down Expand Up @@ -1838,21 +1838,21 @@
"v1ExpSchemaFilter": {
"type": "object",
"properties": {
"optionalDefinitionNameMatch": {
"optionalDefinitionNameFilter": {
"type": "string",
"description": "optional_definition_name_match is a regex that is matched against the definition name."
"description": "optional_definition_name_filter is a prefix that is matched against the definition name."
},
"optionalCaveatNameMatch": {
"optionalCaveatNameFilter": {
"type": "string",
"description": "optional_caveat_name_match is a regex that is matched against the caveat name."
"description": "optional_caveat_name_filter is a prefix that is matched against the caveat name."
},
"optionalRelationNameMatch": {
"optionalRelationNameFilter": {
"type": "string",
"description": "optional_relation_name_match is a regex that is matched against the relation name."
"description": "optional_relation_name_filter is a prefix that is matched against the relation name."
},
"optionalPermissionNameMatch": {
"optionalPermissionNameFilter": {
"type": "string",
"description": "optional_permission_name_match is a regex that is matched against the permission name."
"description": "optional_permission_name_filter is a prefix that is matched against the permission name."
}
},
"description": "ExpSchemaFilter is a filter that can be applied to the schema on reflection."
Expand Down Expand Up @@ -1925,9 +1925,9 @@
"$ref": "#/definitions/v1ExpRelationReference"
}
},
"optionalDefinitionNameMatch": {
"optionalDefinitionNameFilter": {
"type": "string",
"description": "optional_definition_name_match is a regex that is matched against the definition name(s)\nfor the permissions returned.\nIf not specified, will be ignored."
"description": "optional_definition_name_match is a prefix that is matched against the definition name(s)\nfor the permissions returned.\nIf not specified, will be ignored."
}
}
},
Expand Down Expand Up @@ -1974,6 +1974,33 @@
}
}
},
"v1ExperimentalDiffSchemaRequest": {
"type": "object",
"properties": {
"consistency": {
"$ref": "#/definitions/v1Consistency"
},
"comparisonSchema": {
"type": "string"
}
}
},
"v1ExperimentalDiffSchemaResponse": {
"type": "object",
"properties": {
"diffs": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/v1ExpSchemaDiff"
}
},
"readAt": {
"$ref": "#/definitions/v1ZedToken",
"description": "read_at is the ZedToken at which the schema was read."
}
}
},
"v1ExperimentalReflectSchemaRequest": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -2015,33 +2042,6 @@
}
}
},
"v1ExperimentalSchemaDiffRequest": {
"type": "object",
"properties": {
"consistency": {
"$ref": "#/definitions/v1Consistency"
},
"comparisonSchema": {
"type": "string"
}
}
},
"v1ExperimentalSchemaDiffResponse": {
"type": "object",
"properties": {
"diffs": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/v1ExpSchemaDiff"
}
},
"readAt": {
"$ref": "#/definitions/v1ZedToken",
"description": "read_at is the ZedToken at which the schema was read."
}
}
},
"v1LookupPermissionship": {
"type": "string",
"enum": [
Expand Down
2 changes: 1 addition & 1 deletion proto/authzed/api/v0/zz_generated.version.go
Expand Up @@ -2,5 +2,5 @@ package v0

const (
BufRepository = "buf.build/authzed/api"
BufTag = "8e9616c4e4cb940cfd70fe5c2c4e2888d0e8a765"
BufTag = "aa9a74cba13a9e97c419bb5b9c8ef7c0cc7eb13e"
)
28 changes: 21 additions & 7 deletions proto/authzed/api/v1/error_reason.pb.go

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

0 comments on commit 1e5f214

Please sign in to comment.