|
37 | 37 | "parameters": [
|
38 | 38 | {
|
39 | 39 | "name": "namespace",
|
| 40 | + "description": "The namespace whose config should be read.", |
40 | 41 | "in": "query",
|
41 | 42 | "required": false,
|
42 | 43 | "type": "string"
|
|
47 | 48 | ]
|
48 | 49 | },
|
49 | 50 | "put": {
|
50 |
| - "summary": "WriteConfig upserts a namespace configuration. If the namespace config already exists,\nthe existing one is overwritten.", |
51 |
| - "description": "If the new namespace config removes an existing relation, there must not be any relation\ntuples that reference it. Otherwise a FAILED_PRECONDITION status is returned. To migrate\naway from a relation, please move all existing relation tuples referencing it over to the\nnew relation and then delete the old relation once all tuples have been migrated.", |
| 51 | + "summary": "WriteConfig upserts a namespace configuration.", |
| 52 | + "description": "If the namespace config already exists, the existing one is overwritten. If the new\nnamespace config removes an existing relation, there must not be any relation tuples\nthat reference it. Otherwise a FAILED_PRECONDITION status is returned.\n\nTo migrate away from a relation, please move all existing relation tuples referencing\nit over to the new relation and then delete the old relation once all tuples have been\nmigrated.", |
52 | 53 | "operationId": "NamespaceConfigService_WriteConfig",
|
53 | 54 | "responses": {
|
54 | 55 | "200": {
|
|
82 | 83 | },
|
83 | 84 | "definitions": {
|
84 | 85 | "ChildThis": {
|
85 |
| - "type": "object" |
| 86 | + "type": "object", |
| 87 | + "description": "This references the defined relation directly." |
86 | 88 | },
|
87 | 89 | "SetOperationChild": {
|
88 | 90 | "type": "object",
|
|
145 | 147 | "relation": {
|
146 | 148 | "type": "string"
|
147 | 149 | }
|
148 |
| - } |
| 150 | + }, |
| 151 | + "description": "Computes the set of subjects that have the included relation within the\nsame namespace.\n\nThis is useful to follow relations between an object and subject within\nthe same namespace. If you want anyone with an 'editor' relation to also\nhave 'viewer' this would be a good fit." |
149 | 152 | },
|
150 | 153 | "v1alpha1NamespaceConfig": {
|
151 | 154 | "type": "object",
|
152 | 155 | "properties": {
|
153 | 156 | "name": {
|
154 |
| - "type": "string" |
| 157 | + "type": "string", |
| 158 | + "description": "The name of the namespace." |
155 | 159 | },
|
156 | 160 | "relations": {
|
157 | 161 | "type": "array",
|
158 | 162 | "items": {
|
159 | 163 | "$ref": "#/definitions/v1alpha1Relation"
|
160 |
| - } |
| 164 | + }, |
| 165 | + "description": "The relations that this namespace defines." |
161 | 166 | }
|
162 |
| - } |
| 167 | + }, |
| 168 | + "description": "A namespace config defines the relations that exist between objects and subjects in\nin a namespace." |
163 | 169 | },
|
164 | 170 | "v1alpha1ReadConfigResponse": {
|
165 | 171 | "type": "object",
|
166 | 172 | "properties": {
|
167 | 173 | "namespace": {
|
168 |
| - "type": "string" |
| 174 | + "type": "string", |
| 175 | + "description": "The namespace of the config." |
169 | 176 | },
|
170 | 177 | "config": {
|
171 |
| - "$ref": "#/definitions/v1alpha1NamespaceConfig" |
| 178 | + "$ref": "#/definitions/v1alpha1NamespaceConfig", |
| 179 | + "description": "The namespace config for the given namespace." |
172 | 180 | }
|
173 | 181 | },
|
174 | 182 | "description": "The response for a NamespaceConfigService.ReadConfig rpc."
|
|
177 | 185 | "type": "object",
|
178 | 186 | "properties": {
|
179 | 187 | "name": {
|
180 |
| - "type": "string" |
| 188 | + "type": "string", |
| 189 | + "description": "The name of the relation (e.g. viewer, editor, or member)." |
181 | 190 | },
|
182 | 191 | "rewrite": {
|
183 |
| - "$ref": "#/definitions/v1alpha1Rewrite" |
| 192 | + "$ref": "#/definitions/v1alpha1Rewrite", |
| 193 | + "description": "The rewrite rule for this relation, or nil if it references itself." |
184 | 194 | }
|
185 |
| - } |
| 195 | + }, |
| 196 | + "description": "A Relation defines a type of relationship between an object and subject.\n\nRelations can have rewrite rules that specify how the relation is\ncomputed relative to other relations defined within the same namespace\nor across other namespaces." |
186 | 197 | },
|
187 | 198 | "v1alpha1Rewrite": {
|
188 | 199 | "type": "object",
|
189 | 200 | "properties": {
|
190 | 201 | "union": {
|
191 |
| - "$ref": "#/definitions/v1alpha1SetOperation" |
| 202 | + "$ref": "#/definitions/v1alpha1SetOperation", |
| 203 | + "description": "Joins the children of the rewrite via set union." |
192 | 204 | },
|
193 | 205 | "intersection": {
|
194 |
| - "$ref": "#/definitions/v1alpha1SetOperation" |
| 206 | + "$ref": "#/definitions/v1alpha1SetOperation", |
| 207 | + "description": "Joins the children of the rewrite via set intersection." |
195 | 208 | }
|
196 |
| - } |
| 209 | + }, |
| 210 | + "description": "Rewrites define sub-expressions that combine operations such as union or intersection. A rewrite\nsub-expression can be recursive and thus allows arbitrary logical expressions to be constructed." |
197 | 211 | },
|
198 | 212 | "v1alpha1SetOperation": {
|
199 | 213 | "type": "object",
|
|
210 | 224 | "type": "object",
|
211 | 225 | "properties": {
|
212 | 226 | "tupleset": {
|
213 |
| - "$ref": "#/definitions/TupleToSubjectsetTupleset" |
| 227 | + "$ref": "#/definitions/TupleToSubjectsetTupleset", |
| 228 | + "description": "A tupleset defining the relation tuples that relate to the set of subjects that\nthis TupleToSubjectset applies to." |
214 | 229 | },
|
215 | 230 | "computedSubjectset": {
|
216 |
| - "$ref": "#/definitions/v1alpha1ComputedSubjectset" |
| 231 | + "$ref": "#/definitions/v1alpha1ComputedSubjectset", |
| 232 | + "description": "The computed set of subjects that are looked up based on the expanded tupleset." |
217 | 233 | }
|
218 |
| - } |
| 234 | + }, |
| 235 | + "description": "Computes a tupleset from the input object, fetches relation tuples matching the\ntupleset, and computes the set of subjects from every fetched relation tuple.\n\nThis is useful to lookup relations in other namespaces or to create complex hierarchies\nbetween objects in multiple namespaces." |
219 | 236 | },
|
220 | 237 | "v1alpha1WriteConfigRequest": {
|
221 | 238 | "type": "object",
|
222 | 239 | "properties": {
|
223 | 240 | "config": {
|
224 |
| - "$ref": "#/definitions/v1alpha1NamespaceConfig" |
| 241 | + "$ref": "#/definitions/v1alpha1NamespaceConfig", |
| 242 | + "description": "The namespace config to upsert." |
225 | 243 | }
|
226 | 244 | },
|
227 | 245 | "description": "The request for a NamespaceConfigService.WriteConfig rpc."
|
|
0 commit comments