OLD | NEW |
1 { | 1 { |
2 "auth": { | 2 "auth": { |
3 "oauth2": { | 3 "oauth2": { |
4 "scopes": { | 4 "scopes": { |
| 5 "https://www.googleapis.com/auth/cloud-platform": { |
| 6 "description": "View and manage your data across Google Clou
d Platform services" |
| 7 }, |
5 "https://www.googleapis.com/auth/firebase": { | 8 "https://www.googleapis.com/auth/firebase": { |
6 "description": "View and administer all your Firebase data a
nd settings" | 9 "description": "View and administer all your Firebase data a
nd settings" |
7 }, | 10 }, |
8 "https://www.googleapis.com/auth/firebase.readonly": { | 11 "https://www.googleapis.com/auth/firebase.readonly": { |
9 "description": "View all your Firebase data and settings" | 12 "description": "View all your Firebase data and settings" |
10 }, | |
11 "https://www.googleapis.com/auth/cloud-platform": { | |
12 "description": "View and manage your data across Google Clou
d Platform services" | |
13 } | 13 } |
14 } | 14 } |
15 } | 15 } |
16 }, | 16 }, |
17 "basePath": "", | 17 "basePath": "", |
18 "baseUrl": "https://firebaserules.googleapis.com/", | 18 "baseUrl": "https://firebaserules.googleapis.com/", |
19 "batchPath": "batch", | 19 "batchPath": "batch", |
20 "canonicalName": "Firebase Rules", | 20 "canonicalName": "Firebase Rules", |
21 "description": "Creates and manages rules that determine when a Firebase Rul
es-enabled service should permit a request.\n", | 21 "description": "Creates and manages rules that determine when a Firebase Rul
es-enabled service should permit a request.\n", |
22 "discoveryVersion": "v1", | 22 "discoveryVersion": "v1", |
23 "documentationLink": "https://firebase.google.com/docs/storage/security", | 23 "documentationLink": "https://firebase.google.com/docs/storage/security", |
24 "icons": { | 24 "icons": { |
25 "x16": "http://www.google.com/images/icons/product/search-16.gif", | 25 "x16": "http://www.google.com/images/icons/product/search-16.gif", |
26 "x32": "http://www.google.com/images/icons/product/search-32.gif" | 26 "x32": "http://www.google.com/images/icons/product/search-32.gif" |
27 }, | 27 }, |
28 "id": "firebaserules:v1", | 28 "id": "firebaserules:v1", |
29 "kind": "discovery#restDescription", | 29 "kind": "discovery#restDescription", |
30 "name": "firebaserules", | 30 "name": "firebaserules", |
31 "ownerDomain": "google.com", | 31 "ownerDomain": "google.com", |
32 "ownerName": "Google", | 32 "ownerName": "Google", |
33 "parameters": { | 33 "parameters": { |
34 "pp": { | |
35 "default": "true", | |
36 "description": "Pretty-print response.", | |
37 "location": "query", | |
38 "type": "boolean" | |
39 }, | |
40 "bearer_token": { | |
41 "description": "OAuth bearer token.", | |
42 "location": "query", | |
43 "type": "string" | |
44 }, | |
45 "oauth_token": { | |
46 "description": "OAuth 2.0 token for the current user.", | |
47 "location": "query", | |
48 "type": "string" | |
49 }, | |
50 "upload_protocol": { | 34 "upload_protocol": { |
51 "description": "Upload protocol for media (e.g. \"raw\", \"multipart
\").", | 35 "description": "Upload protocol for media (e.g. \"raw\", \"multipart
\").", |
52 "location": "query", | 36 "location": "query", |
53 "type": "string" | 37 "type": "string" |
54 }, | 38 }, |
55 "prettyPrint": { | 39 "prettyPrint": { |
56 "default": "true", | 40 "default": "true", |
57 "description": "Returns response with indentations and line breaks."
, | 41 "description": "Returns response with indentations and line breaks."
, |
58 "location": "query", | 42 "location": "query", |
59 "type": "boolean" | 43 "type": "boolean" |
60 }, | 44 }, |
| 45 "fields": { |
| 46 "description": "Selector specifying which fields to include in a par
tial response.", |
| 47 "location": "query", |
| 48 "type": "string" |
| 49 }, |
61 "uploadType": { | 50 "uploadType": { |
62 "description": "Legacy upload protocol for media (e.g. \"media\", \"
multipart\").", | 51 "description": "Legacy upload protocol for media (e.g. \"media\", \"
multipart\").", |
63 "location": "query", | 52 "location": "query", |
64 "type": "string" | 53 "type": "string" |
65 }, | 54 }, |
66 "fields": { | |
67 "description": "Selector specifying which fields to include in a par
tial response.", | |
68 "location": "query", | |
69 "type": "string" | |
70 }, | |
71 "callback": { | 55 "callback": { |
72 "description": "JSONP", | 56 "description": "JSONP", |
73 "location": "query", | 57 "location": "query", |
74 "type": "string" | 58 "type": "string" |
75 }, | 59 }, |
76 "$.xgafv": { | 60 "$.xgafv": { |
77 "description": "V1 error format.", | 61 "description": "V1 error format.", |
78 "enum": [ | 62 "enum": [ |
79 "1", | 63 "1", |
80 "2" | 64 "2" |
(...skipping 28 matching lines...) Expand all Loading... |
109 }, | 93 }, |
110 "access_token": { | 94 "access_token": { |
111 "description": "OAuth access token.", | 95 "description": "OAuth access token.", |
112 "location": "query", | 96 "location": "query", |
113 "type": "string" | 97 "type": "string" |
114 }, | 98 }, |
115 "quotaUser": { | 99 "quotaUser": { |
116 "description": "Available to use for quota purposes for server-side
applications. Can be any arbitrary string assigned to a user, but should not exc
eed 40 characters.", | 100 "description": "Available to use for quota purposes for server-side
applications. Can be any arbitrary string assigned to a user, but should not exc
eed 40 characters.", |
117 "location": "query", | 101 "location": "query", |
118 "type": "string" | 102 "type": "string" |
| 103 }, |
| 104 "pp": { |
| 105 "default": "true", |
| 106 "description": "Pretty-print response.", |
| 107 "location": "query", |
| 108 "type": "boolean" |
| 109 }, |
| 110 "bearer_token": { |
| 111 "description": "OAuth bearer token.", |
| 112 "location": "query", |
| 113 "type": "string" |
| 114 }, |
| 115 "oauth_token": { |
| 116 "description": "OAuth 2.0 token for the current user.", |
| 117 "location": "query", |
| 118 "type": "string" |
119 } | 119 } |
120 }, | 120 }, |
121 "protocol": "rest", | 121 "protocol": "rest", |
122 "resources": { | 122 "resources": { |
123 "projects": { | 123 "projects": { |
124 "methods": { | 124 "methods": { |
125 "test": { | 125 "test": { |
126 "description": "Test `Source` for syntactic and semantic cor
rectness. Issues present, if\nany, will be returned to the caller with a descrip
tion, severity, and\nsource location.\n\nThe test method may be executed with `S
ource` or a `Ruleset` name.\nPassing `Source` is useful for unit testing new rul
es. Passing a `Ruleset`\nname is useful for regression testing an existing rule.
\n\nThe following is an example of `Source` that permits users to upload images\
nto a bucket bearing their user id and matching the correct metadata:\n\n_*Examp
le*_\n\n // Users are allowed to subscribe and unsubscribe to the blog.\n
service firebase.storage {\n match /users/{userId}/images/{imageName} {\n
allow write: if userId == request.auth.uid\n && (imageName.
matches('*.png$')\n || imageName.matches('*.jpg$'))\n
&& resource.mimeType.matches('^image/')\n }\n }", | 126 "description": "Test `Source` for syntactic and semantic cor
rectness. Issues present, if\nany, will be returned to the caller with a descrip
tion, severity, and\nsource location.\n\nThe test method may be executed with `S
ource` or a `Ruleset` name.\nPassing `Source` is useful for unit testing new rul
es. Passing a `Ruleset`\nname is useful for regression testing an existing rule.
\n\nThe following is an example of `Source` that permits users to upload images\
nto a bucket bearing their user id and matching the correct metadata:\n\n_*Examp
le*_\n\n // Users are allowed to subscribe and unsubscribe to the blog.\n
service firebase.storage {\n match /users/{userId}/images/{imageName} {\n
allow write: if userId == request.auth.uid\n && (imageName.
matches('*.png$')\n || imageName.matches('*.jpg$'))\n
&& resource.mimeType.matches('^image/')\n }\n }", |
127 "httpMethod": "POST", | 127 "httpMethod": "POST", |
128 "id": "firebaserules.projects.test", | 128 "id": "firebaserules.projects.test", |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 }, | 273 }, |
274 "scopes": [ | 274 "scopes": [ |
275 "https://www.googleapis.com/auth/cloud-platform"
, | 275 "https://www.googleapis.com/auth/cloud-platform"
, |
276 "https://www.googleapis.com/auth/firebase" | 276 "https://www.googleapis.com/auth/firebase" |
277 ] | 277 ] |
278 } | 278 } |
279 } | 279 } |
280 }, | 280 }, |
281 "releases": { | 281 "releases": { |
282 "methods": { | 282 "methods": { |
| 283 "delete": { |
| 284 "description": "Delete a `Release` by resource name.
", |
| 285 "httpMethod": "DELETE", |
| 286 "id": "firebaserules.projects.releases.delete", |
| 287 "parameterOrder": [ |
| 288 "name" |
| 289 ], |
| 290 "parameters": { |
| 291 "name": { |
| 292 "description": "Resource name for the `Relea
se` to delete.\n\nFormat: `projects/{project_id}/releases/{release_id}`", |
| 293 "location": "path", |
| 294 "pattern": "^projects/[^/]+/releases/.+$", |
| 295 "required": true, |
| 296 "type": "string" |
| 297 } |
| 298 }, |
| 299 "path": "v1/{+name}", |
| 300 "response": { |
| 301 "$ref": "Empty" |
| 302 }, |
| 303 "scopes": [ |
| 304 "https://www.googleapis.com/auth/cloud-platform"
, |
| 305 "https://www.googleapis.com/auth/firebase" |
| 306 ] |
| 307 }, |
283 "get": { | 308 "get": { |
284 "description": "Get a `Release` by name.", | 309 "description": "Get a `Release` by name.", |
285 "httpMethod": "GET", | 310 "httpMethod": "GET", |
286 "id": "firebaserules.projects.releases.get", | 311 "id": "firebaserules.projects.releases.get", |
287 "parameterOrder": [ | 312 "parameterOrder": [ |
288 "name" | 313 "name" |
289 ], | 314 ], |
290 "parameters": { | 315 "parameters": { |
291 "name": { | 316 "name": { |
292 "description": "Resource name of the `Releas
e`.\n\nFormat: `projects/{project_id}/releases/{release_id}`", | 317 "description": "Resource name of the `Releas
e`.\n\nFormat: `projects/{project_id}/releases/{release_id}`", |
(...skipping 14 matching lines...) Expand all Loading... |
307 ] | 332 ] |
308 }, | 333 }, |
309 "list": { | 334 "list": { |
310 "description": "List the `Release` values for a proj
ect. This list may optionally be\nfiltered by `Release` name, `Ruleset` name, `T
estSuite` name, or any\ncombination thereof.", | 335 "description": "List the `Release` values for a proj
ect. This list may optionally be\nfiltered by `Release` name, `Ruleset` name, `T
estSuite` name, or any\ncombination thereof.", |
311 "httpMethod": "GET", | 336 "httpMethod": "GET", |
312 "id": "firebaserules.projects.releases.list", | 337 "id": "firebaserules.projects.releases.list", |
313 "parameterOrder": [ | 338 "parameterOrder": [ |
314 "name" | 339 "name" |
315 ], | 340 ], |
316 "parameters": { | 341 "parameters": { |
317 "filter": { | |
318 "description": "`Release` filter. The list m
ethod supports filters with restrictions on the\n`Release.name`, `Release.rulese
t_name`, and `Release.test_suite_name`.\n\nExample 1: A filter of 'name=prod*' m
ight return `Release`s with names\nwithin 'projects/foo' prefixed with 'prod':\n
\nName | Ruleset Name\n------------------------------|-
------------\nprojects/foo/releases/prod | projects/foo/rulesets/uuid1234\npr
ojects/foo/releases/prod/v1 | projects/foo/rulesets/uuid1234\nprojects/foo/relea
ses/prod/v2 | projects/foo/rulesets/uuid8888\n\nExample 2: A filter of `name=pro
d* ruleset_name=uuid1234` would return only\n`Release` instances for 'projects/f
oo' with names prefixed with 'prod'\nreferring to the same `Ruleset` name of 'uu
id1234':\n\nName | Ruleset Name\n----------------------
--------|-------------\nprojects/foo/releases/prod | projects/foo/rulesets/12
34\nprojects/foo/releases/prod/v1 | projects/foo/rulesets/1234\n\nIn the example
s, the filter parameters refer to the search filters are\nrelative to the projec
t. Fully qualified prefixed may also be used. e.g.\n`test_suite_name=projects/fo
o/testsuites/uuid1`", | |
319 "location": "query", | |
320 "type": "string" | |
321 }, | |
322 "name": { | 342 "name": { |
323 "description": "Resource name for the projec
t.\n\nFormat: `projects/{project_id}`", | 343 "description": "Resource name for the projec
t.\n\nFormat: `projects/{project_id}`", |
324 "location": "path", | 344 "location": "path", |
325 "pattern": "^projects/[^/]+$", | 345 "pattern": "^projects/[^/]+$", |
326 "required": true, | 346 "required": true, |
327 "type": "string" | 347 "type": "string" |
328 }, | 348 }, |
329 "pageToken": { | 349 "pageToken": { |
330 "description": "Next page token for the next
batch of `Release` instances.", | 350 "description": "Next page token for the next
batch of `Release` instances.", |
331 "location": "query", | 351 "location": "query", |
332 "type": "string" | 352 "type": "string" |
333 }, | 353 }, |
334 "pageSize": { | 354 "pageSize": { |
335 "description": "Page size to load. Maximum o
f 100. Defaults to 10.\nNote: `page_size` is just a hint and the service may cho
ose to load fewer\nthan `page_size` results due to the size of the output. To tr
averse all of\nthe releases, the caller should iterate until the `page_token` on
the\nresponse is empty.", | 355 "description": "Page size to load. Maximum o
f 100. Defaults to 10.\nNote: `page_size` is just a hint and the service may cho
ose to load fewer\nthan `page_size` results due to the size of the output. To tr
averse all of\nthe releases, the caller should iterate until the `page_token` on
the\nresponse is empty.", |
336 "format": "int32", | 356 "format": "int32", |
337 "location": "query", | 357 "location": "query", |
338 "type": "integer" | 358 "type": "integer" |
| 359 }, |
| 360 "filter": { |
| 361 "description": "`Release` filter. The list m
ethod supports filters with restrictions on the\n`Release.name`, `Release.rulese
t_name`, and `Release.test_suite_name`.\n\nExample 1: A filter of 'name=prod*' m
ight return `Release`s with names\nwithin 'projects/foo' prefixed with 'prod':\n
\nName | Ruleset Name\n------------------------------|-
------------\nprojects/foo/releases/prod | projects/foo/rulesets/uuid1234\npr
ojects/foo/releases/prod/v1 | projects/foo/rulesets/uuid1234\nprojects/foo/relea
ses/prod/v2 | projects/foo/rulesets/uuid8888\n\nExample 2: A filter of `name=pro
d* ruleset_name=uuid1234` would return only\n`Release` instances for 'projects/f
oo' with names prefixed with 'prod'\nreferring to the same `Ruleset` name of 'uu
id1234':\n\nName | Ruleset Name\n----------------------
--------|-------------\nprojects/foo/releases/prod | projects/foo/rulesets/12
34\nprojects/foo/releases/prod/v1 | projects/foo/rulesets/1234\n\nIn the example
s, the filter parameters refer to the search filters are\nrelative to the projec
t. Fully qualified prefixed may also be used. e.g.\n`test_suite_name=projects/fo
o/testsuites/uuid1`", |
| 362 "location": "query", |
| 363 "type": "string" |
339 } | 364 } |
340 }, | 365 }, |
341 "path": "v1/{+name}/releases", | 366 "path": "v1/{+name}/releases", |
342 "response": { | 367 "response": { |
343 "$ref": "ListReleasesResponse" | 368 "$ref": "ListReleasesResponse" |
344 }, | 369 }, |
345 "scopes": [ | 370 "scopes": [ |
346 "https://www.googleapis.com/auth/cloud-platform"
, | 371 "https://www.googleapis.com/auth/cloud-platform"
, |
347 "https://www.googleapis.com/auth/firebase", | 372 "https://www.googleapis.com/auth/firebase", |
348 "https://www.googleapis.com/auth/firebase.readon
ly" | 373 "https://www.googleapis.com/auth/firebase.readon
ly" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 "request": { | 421 "request": { |
397 "$ref": "Release" | 422 "$ref": "Release" |
398 }, | 423 }, |
399 "response": { | 424 "response": { |
400 "$ref": "Release" | 425 "$ref": "Release" |
401 }, | 426 }, |
402 "scopes": [ | 427 "scopes": [ |
403 "https://www.googleapis.com/auth/cloud-platform"
, | 428 "https://www.googleapis.com/auth/cloud-platform"
, |
404 "https://www.googleapis.com/auth/firebase" | 429 "https://www.googleapis.com/auth/firebase" |
405 ] | 430 ] |
406 }, | |
407 "delete": { | |
408 "description": "Delete a `Release` by resource name.
", | |
409 "httpMethod": "DELETE", | |
410 "id": "firebaserules.projects.releases.delete", | |
411 "parameterOrder": [ | |
412 "name" | |
413 ], | |
414 "parameters": { | |
415 "name": { | |
416 "description": "Resource name for the `Relea
se` to delete.\n\nFormat: `projects/{project_id}/releases/{release_id}`", | |
417 "location": "path", | |
418 "pattern": "^projects/[^/]+/releases/.+$", | |
419 "required": true, | |
420 "type": "string" | |
421 } | |
422 }, | |
423 "path": "v1/{+name}", | |
424 "response": { | |
425 "$ref": "Empty" | |
426 }, | |
427 "scopes": [ | |
428 "https://www.googleapis.com/auth/cloud-platform"
, | |
429 "https://www.googleapis.com/auth/firebase" | |
430 ] | |
431 } | 431 } |
432 } | 432 } |
433 } | 433 } |
434 } | 434 } |
435 } | 435 } |
436 }, | 436 }, |
437 "revision": "20170418", | 437 "revision": "20170523", |
438 "rootUrl": "https://firebaserules.googleapis.com/", | 438 "rootUrl": "https://firebaserules.googleapis.com/", |
439 "schemas": { | 439 "schemas": { |
440 "TestRulesetResponse": { | 440 "Empty": { |
441 "description": "The response for FirebaseRulesService.TestRuleset.", | 441 "description": "A generic empty message that you can re-use to avoid
defining duplicated\nempty messages in your APIs. A typical example is to use i
t as the request\nor the response type of an API method. For instance:\n\n se
rvice Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty
);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", |
442 "id": "TestRulesetResponse", | 442 "id": "Empty", |
| 443 "properties": {}, |
| 444 "type": "object" |
| 445 }, |
| 446 "FunctionMock": { |
| 447 "description": "Mock function definition.\n\nMocks must refer to a f
unction declared by the target service. The type of\nthe function args and resul
t will be inferred at test time. If either the\narg or result values are not com
patible with function type declaration, the\nrequest will be considered invalid.
\n\nMore than one `FunctionMock` may be provided for a given function name so\nl
ong as the `Arg` matchers are distinct. There may be only one function\nfor a gi
ven overload where all `Arg` values are `Arg.any_value`.", |
| 448 "id": "FunctionMock", |
443 "properties": { | 449 "properties": { |
444 "testResults": { | 450 "function": { |
445 "description": "The set of test results given the test cases
in the `TestSuite`.\nThe results will appear in the same order as the test case
s appear in the\n`TestSuite`.", | 451 "description": "The name of the function.\n\nThe function na
me must match one provided by a service declaration.", |
| 452 "type": "string" |
| 453 }, |
| 454 "result": { |
| 455 "$ref": "Result", |
| 456 "description": "The mock result of the function call." |
| 457 }, |
| 458 "args": { |
| 459 "description": "The list of `Arg` values to match. The order
in which the arguments are\nprovided is the order in which they must appear in
the function\ninvocation.", |
446 "items": { | 460 "items": { |
447 "$ref": "TestResult" | 461 "$ref": "Arg" |
448 }, | |
449 "type": "array" | |
450 }, | |
451 "issues": { | |
452 "description": "Syntactic and semantic `Source` issues of va
rying severity. Issues of\n`ERROR` severity will prevent tests from executing.", | |
453 "items": { | |
454 "$ref": "Issue" | |
455 }, | 462 }, |
456 "type": "array" | 463 "type": "array" |
457 } | 464 } |
458 }, | 465 }, |
459 "type": "object" | 466 "type": "object" |
460 }, | 467 }, |
461 "ListRulesetsResponse": { | |
462 "description": "The response for FirebaseRulesService.ListRulesets."
, | |
463 "id": "ListRulesetsResponse", | |
464 "properties": { | |
465 "nextPageToken": { | |
466 "description": "The pagination token to retrieve the next pa
ge of results. If the value is\nempty, no further results remain.", | |
467 "type": "string" | |
468 }, | |
469 "rulesets": { | |
470 "description": "List of `Ruleset` instances.", | |
471 "items": { | |
472 "$ref": "Ruleset" | |
473 }, | |
474 "type": "array" | |
475 } | |
476 }, | |
477 "type": "object" | |
478 }, | |
479 "TestResult": { | |
480 "description": "Test result message containing the state of the test
as well as a\ndescription and source position for test failures.", | |
481 "id": "TestResult", | |
482 "properties": { | |
483 "functionCalls": { | |
484 "description": "The set of function calls made to service-de
fined methods.\n\nFunction calls are included in the order in which they are enc
ountered\nduring evaluation, are provided for both mocked and unmocked functions
,\nand included on the response regardless of the test `state`.", | |
485 "items": { | |
486 "$ref": "FunctionCall" | |
487 }, | |
488 "type": "array" | |
489 }, | |
490 "state": { | |
491 "description": "State of the test.", | |
492 "enum": [ | |
493 "STATE_UNSPECIFIED", | |
494 "SUCCESS", | |
495 "FAILURE" | |
496 ], | |
497 "enumDescriptions": [ | |
498 "Test state is not set.", | |
499 "Test is a success.", | |
500 "Test is a failure." | |
501 ], | |
502 "type": "string" | |
503 }, | |
504 "debugMessages": { | |
505 "description": "Debug messages related to test execution iss
ues encountered during\nevaluation.\n\nDebug messages may be related to too many
or too few invocations of\nfunction mocks or to runtime errors that occur durin
g evaluation.\n\nFor example: ```Unable to read variable [name: \"resource\"]```
", | |
506 "items": { | |
507 "type": "string" | |
508 }, | |
509 "type": "array" | |
510 }, | |
511 "errorPosition": { | |
512 "$ref": "SourcePosition", | |
513 "description": "Position in the `Source` or `Ruleset` where
the principle runtime error\noccurs.\n\nEvaluation of an expression may result i
n an error. Rules are deny by\ndefault, so a `DENY` expectation when an error is
generated is valid.\nWhen there is a `DENY` with an error, the `SourcePosition`
is returned.\n\nE.g. `error_position { line: 19 column: 37 }`" | |
514 } | |
515 }, | |
516 "type": "object" | |
517 }, | |
518 "Empty": { | |
519 "description": "A generic empty message that you can re-use to avoid
defining duplicated\nempty messages in your APIs. A typical example is to use i
t as the request\nor the response type of an API method. For instance:\n\n se
rvice Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty
);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", | |
520 "id": "Empty", | |
521 "properties": {}, | |
522 "type": "object" | |
523 }, | |
524 "Source": { | 468 "Source": { |
525 "description": "`Source` is one or more `File` messages comprising a
logical set of rules.", | 469 "description": "`Source` is one or more `File` messages comprising a
logical set of rules.", |
526 "id": "Source", | 470 "id": "Source", |
527 "properties": { | 471 "properties": { |
528 "files": { | 472 "files": { |
529 "description": "`File` set constituting the `Source` bundle.
", | 473 "description": "`File` set constituting the `Source` bundle.
", |
530 "items": { | 474 "items": { |
531 "$ref": "File" | 475 "$ref": "File" |
532 }, | 476 }, |
533 "type": "array" | 477 "type": "array" |
534 } | 478 } |
535 }, | 479 }, |
536 "type": "object" | 480 "type": "object" |
537 }, | 481 }, |
| 482 "Result": { |
| 483 "description": "Possible result values from the function mock invoca
tion.", |
| 484 "id": "Result", |
| 485 "properties": { |
| 486 "value": { |
| 487 "description": "The result is an actual value. The type of t
he value must match that\nof the type declared by the service.", |
| 488 "type": "any" |
| 489 }, |
| 490 "undefined": { |
| 491 "$ref": "Empty", |
| 492 "description": "The result is undefined, meaning the result
could not be computed." |
| 493 } |
| 494 }, |
| 495 "type": "object" |
| 496 }, |
538 "SourcePosition": { | 497 "SourcePosition": { |
539 "description": "Position in the `Source` content including its line,
column number, and an\nindex of the `File` in the `Source` message. Used for de
bug purposes.", | 498 "description": "Position in the `Source` content including its line,
column number, and an\nindex of the `File` in the `Source` message. Used for de
bug purposes.", |
540 "id": "SourcePosition", | 499 "id": "SourcePosition", |
541 "properties": { | 500 "properties": { |
542 "column": { | 501 "column": { |
543 "description": "First column on the source line associated w
ith the source fragment.", | 502 "description": "First column on the source line associated w
ith the source fragment.", |
544 "format": "int32", | 503 "format": "int32", |
545 "type": "integer" | 504 "type": "integer" |
546 }, | 505 }, |
547 "fileName": { | 506 "fileName": { |
548 "description": "Name of the `File`.", | 507 "description": "Name of the `File`.", |
549 "type": "string" | 508 "type": "string" |
550 }, | 509 }, |
551 "line": { | 510 "line": { |
552 "description": "Line number of the source fragment. 1-based.
", | 511 "description": "Line number of the source fragment. 1-based.
", |
553 "format": "int32", | 512 "format": "int32", |
554 "type": "integer" | 513 "type": "integer" |
555 } | 514 } |
556 }, | 515 }, |
557 "type": "object" | 516 "type": "object" |
558 }, | 517 }, |
559 "TestRulesetRequest": { | 518 "TestCase": { |
560 "description": "The request for FirebaseRulesService.TestRuleset.", | 519 "description": "`TestCase` messages provide the request context and
an expectation as to\nwhether the given context will be allowed or denied. Test
cases may specify\nthe `request`, `resource`, and `function_mocks` to mock a fun
ction call to\na service-provided function.\n\nThe `request` object represents c
ontext present at request-time.\n\nThe `resource` is the value of the target res
ource as it appears in\npersistent storage before the request is executed.", |
561 "id": "TestRulesetRequest", | 520 "id": "TestCase", |
562 "properties": { | 521 "properties": { |
563 "source": { | 522 "resource": { |
564 "$ref": "Source", | 523 "description": "Optional resource value as it appears in per
sistent storage before the\nrequest is fulfilled.\n\nThe resource type depends o
n the `request.path` value.", |
565 "description": "Optional `Source` to be checked for correctn
ess.\n\nThis field must not be set when the resource name refers to a `Ruleset`.
" | 524 "type": "any" |
| 525 }, |
| 526 "functionMocks": { |
| 527 "description": "Optional function mocks for service-defined
functions. If not set, any\nservice defined function is expected to return an er
ror, which may or may\nnot influence the test outcome.", |
| 528 "items": { |
| 529 "$ref": "FunctionMock" |
| 530 }, |
| 531 "type": "array" |
| 532 }, |
| 533 "expectation": { |
| 534 "description": "Test expectation.", |
| 535 "enum": [ |
| 536 "EXPECTATION_UNSPECIFIED", |
| 537 "ALLOW", |
| 538 "DENY" |
| 539 ], |
| 540 "enumDescriptions": [ |
| 541 "Unspecified expectation.", |
| 542 "Expect an allowed result.", |
| 543 "Expect a denied result." |
| 544 ], |
| 545 "type": "string" |
| 546 }, |
| 547 "request": { |
| 548 "description": "Request context.\n\nThe exact format of the
request context is service-dependent. See the\nappropriate service documentation
for information about the supported\nfields and types on the request. Minimally
, all services support the\nfollowing fields and types:\n\nRequest field | Type
\n---------------|-----------------\nauth.uid | `string`\nauth.token |
`map<string, string>`\nheaders | `map<string, string>`\nmethod |
`string`\nparams | `map<string, string>`\npath | `string`\nti
me | `google.protobuf.Timestamp`\n\nIf the request value is not well-f
ormed for the service, the request will\nbe rejected as an invalid argument.", |
| 549 "type": "any" |
566 } | 550 } |
567 }, | 551 }, |
568 "type": "object" | 552 "type": "object" |
569 }, | 553 }, |
570 "Issue": { | 554 "Issue": { |
571 "description": "Issues include warnings, errors, and deprecation not
ices.", | 555 "description": "Issues include warnings, errors, and deprecation not
ices.", |
572 "id": "Issue", | 556 "id": "Issue", |
573 "properties": { | 557 "properties": { |
574 "sourcePosition": { | 558 "sourcePosition": { |
575 "$ref": "SourcePosition", | 559 "$ref": "SourcePosition", |
(...skipping 15 matching lines...) Expand all Loading... |
591 ], | 575 ], |
592 "type": "string" | 576 "type": "string" |
593 }, | 577 }, |
594 "description": { | 578 "description": { |
595 "description": "Short error description.", | 579 "description": "Short error description.", |
596 "type": "string" | 580 "type": "string" |
597 } | 581 } |
598 }, | 582 }, |
599 "type": "object" | 583 "type": "object" |
600 }, | 584 }, |
| 585 "TestRulesetRequest": { |
| 586 "description": "The request for FirebaseRulesService.TestRuleset.", |
| 587 "id": "TestRulesetRequest", |
| 588 "properties": { |
| 589 "source": { |
| 590 "$ref": "Source", |
| 591 "description": "Optional `Source` to be checked for correctn
ess.\n\nThis field must not be set when the resource name refers to a `Ruleset`.
" |
| 592 }, |
| 593 "testSuite": { |
| 594 "$ref": "TestSuite", |
| 595 "description": "Inline `TestSuite` to run." |
| 596 } |
| 597 }, |
| 598 "type": "object" |
| 599 }, |
601 "Ruleset": { | 600 "Ruleset": { |
602 "description": "`Ruleset` is an immutable copy of `Source` with a gl
obally unique identifier\nand a creation time.", | 601 "description": "`Ruleset` is an immutable copy of `Source` with a gl
obally unique identifier\nand a creation time.", |
603 "id": "Ruleset", | 602 "id": "Ruleset", |
604 "properties": { | 603 "properties": { |
605 "source": { | 604 "source": { |
606 "$ref": "Source", | 605 "$ref": "Source", |
607 "description": "`Source` for the `Ruleset`." | 606 "description": "`Source` for the `Ruleset`." |
608 }, | 607 }, |
609 "createTime": { | 608 "createTime": { |
610 "description": "Time the `Ruleset` was created.\nOutput only
.", | 609 "description": "Time the `Ruleset` was created.\nOutput only
.", |
611 "format": "google-datetime", | 610 "format": "google-datetime", |
612 "type": "string" | 611 "type": "string" |
613 }, | 612 }, |
614 "name": { | 613 "name": { |
615 "description": "Name of the `Ruleset`. The ruleset_id is aut
o generated by the service.\nFormat: `projects/{project_id}/rulesets/{ruleset_id
}`\nOutput only.", | 614 "description": "Name of the `Ruleset`. The ruleset_id is aut
o generated by the service.\nFormat: `projects/{project_id}/rulesets/{ruleset_id
}`\nOutput only.", |
616 "type": "string" | 615 "type": "string" |
617 } | 616 } |
618 }, | 617 }, |
619 "type": "object" | 618 "type": "object" |
620 }, | 619 }, |
| 620 "File": { |
| 621 "description": "`File` containing source content.", |
| 622 "id": "File", |
| 623 "properties": { |
| 624 "name": { |
| 625 "description": "File name.", |
| 626 "type": "string" |
| 627 }, |
| 628 "content": { |
| 629 "description": "Textual Content.", |
| 630 "type": "string" |
| 631 }, |
| 632 "fingerprint": { |
| 633 "description": "Fingerprint (e.g. github sha) associated wit
h the `File`.", |
| 634 "format": "byte", |
| 635 "type": "string" |
| 636 } |
| 637 }, |
| 638 "type": "object" |
| 639 }, |
621 "FunctionCall": { | 640 "FunctionCall": { |
622 "description": "Represents a service-defined function call that was
invoked during test\nexecution.", | 641 "description": "Represents a service-defined function call that was
invoked during test\nexecution.", |
623 "id": "FunctionCall", | 642 "id": "FunctionCall", |
624 "properties": { | 643 "properties": { |
625 "args": { | 644 "args": { |
626 "description": "The arguments that were provided to the func
tion.", | 645 "description": "The arguments that were provided to the func
tion.", |
627 "items": { | 646 "items": { |
628 "type": "any" | 647 "type": "any" |
629 }, | 648 }, |
630 "type": "array" | 649 "type": "array" |
(...skipping 16 matching lines...) Expand all Loading... |
647 }, | 666 }, |
648 "type": "array" | 667 "type": "array" |
649 }, | 668 }, |
650 "nextPageToken": { | 669 "nextPageToken": { |
651 "description": "The pagination token to retrieve the next pa
ge of results. If the value is\nempty, no further results remain.", | 670 "description": "The pagination token to retrieve the next pa
ge of results. If the value is\nempty, no further results remain.", |
652 "type": "string" | 671 "type": "string" |
653 } | 672 } |
654 }, | 673 }, |
655 "type": "object" | 674 "type": "object" |
656 }, | 675 }, |
657 "File": { | |
658 "description": "`File` containing source content.", | |
659 "id": "File", | |
660 "properties": { | |
661 "name": { | |
662 "description": "File name.", | |
663 "type": "string" | |
664 }, | |
665 "content": { | |
666 "description": "Textual Content.", | |
667 "type": "string" | |
668 }, | |
669 "fingerprint": { | |
670 "description": "Fingerprint (e.g. github sha) associated wit
h the `File`.", | |
671 "format": "byte", | |
672 "type": "string" | |
673 } | |
674 }, | |
675 "type": "object" | |
676 }, | |
677 "Release": { | 676 "Release": { |
678 "description": "`Release` is a named reference to a `Ruleset`. Once
a `Release` refers to a\n`Ruleset`, rules-enabled services will be able to enfor
ce the `Ruleset`.", | 677 "description": "`Release` is a named reference to a `Ruleset`. Once
a `Release` refers to a\n`Ruleset`, rules-enabled services will be able to enfor
ce the `Ruleset`.", |
679 "id": "Release", | 678 "id": "Release", |
680 "properties": { | 679 "properties": { |
681 "updateTime": { | |
682 "description": "Time the release was updated.\nOutput only."
, | |
683 "format": "google-datetime", | |
684 "type": "string" | |
685 }, | |
686 "name": { | 680 "name": { |
687 "description": "Resource name for the `Release`.\n\n`Release
` names may be structured `app1/prod/v2` or flat `app1_prod_v2`\nwhich affords d
evelopers a great deal of flexibility in mapping the name\nto the style that bes
t fits their existing development practices. For\nexample, a name could refer to
an environment, an app, a version, or some\ncombination of three.\n\nIn the tab
le below, for the project name `projects/foo`, the following\nrelative release p
aths show how flat and structured names might be chosen\nto match a desired deve
lopment / deployment strategy.\n\nUse Case | Flat Name | Structure
d Name\n-------------|---------------------|----------------\nEnvironments | rel
eases/qa | releases/qa\nApps | releases/app1_qa | releases/ap
p1/qa\nVersions | releases/app1_v2_qa | releases/app1/v2/qa\n\nThe delimiter
between the release name path elements can be almost anything\nand it should wo
rk equally well with the release name list filter, but in\nmany ways the structu
red paths provide a clearer picture of the\nrelationship between `Release` insta
nces.\n\nFormat: `projects/{project_id}/releases/{release_id}`", | 681 "description": "Resource name for the `Release`.\n\n`Release
` names may be structured `app1/prod/v2` or flat `app1_prod_v2`\nwhich affords d
evelopers a great deal of flexibility in mapping the name\nto the style that bes
t fits their existing development practices. For\nexample, a name could refer to
an environment, an app, a version, or some\ncombination of three.\n\nIn the tab
le below, for the project name `projects/foo`, the following\nrelative release p
aths show how flat and structured names might be chosen\nto match a desired deve
lopment / deployment strategy.\n\nUse Case | Flat Name | Structure
d Name\n-------------|---------------------|----------------\nEnvironments | rel
eases/qa | releases/qa\nApps | releases/app1_qa | releases/ap
p1/qa\nVersions | releases/app1_v2_qa | releases/app1/v2/qa\n\nThe delimiter
between the release name path elements can be almost anything\nand it should wo
rk equally well with the release name list filter, but in\nmany ways the structu
red paths provide a clearer picture of the\nrelationship between `Release` insta
nces.\n\nFormat: `projects/{project_id}/releases/{release_id}`", |
688 "type": "string" | 682 "type": "string" |
689 }, | 683 }, |
690 "rulesetName": { | 684 "rulesetName": { |
691 "description": "Name of the `Ruleset` referred to by this `R
elease`. The `Ruleset` must\nexist the `Release` to be created.", | 685 "description": "Name of the `Ruleset` referred to by this `R
elease`. The `Ruleset` must\nexist the `Release` to be created.", |
692 "type": "string" | 686 "type": "string" |
693 }, | 687 }, |
694 "createTime": { | 688 "createTime": { |
695 "description": "Time the release was created.\nOutput only."
, | 689 "description": "Time the release was created.\nOutput only."
, |
696 "format": "google-datetime", | 690 "format": "google-datetime", |
697 "type": "string" | 691 "type": "string" |
| 692 }, |
| 693 "updateTime": { |
| 694 "description": "Time the release was updated.\nOutput only."
, |
| 695 "format": "google-datetime", |
| 696 "type": "string" |
| 697 } |
| 698 }, |
| 699 "type": "object" |
| 700 }, |
| 701 "TestRulesetResponse": { |
| 702 "description": "The response for FirebaseRulesService.TestRuleset.", |
| 703 "id": "TestRulesetResponse", |
| 704 "properties": { |
| 705 "issues": { |
| 706 "description": "Syntactic and semantic `Source` issues of va
rying severity. Issues of\n`ERROR` severity will prevent tests from executing.", |
| 707 "items": { |
| 708 "$ref": "Issue" |
| 709 }, |
| 710 "type": "array" |
| 711 }, |
| 712 "testResults": { |
| 713 "description": "The set of test results given the test cases
in the `TestSuite`.\nThe results will appear in the same order as the test case
s appear in the\n`TestSuite`.", |
| 714 "items": { |
| 715 "$ref": "TestResult" |
| 716 }, |
| 717 "type": "array" |
| 718 } |
| 719 }, |
| 720 "type": "object" |
| 721 }, |
| 722 "TestResult": { |
| 723 "description": "Test result message containing the state of the test
as well as a\ndescription and source position for test failures.", |
| 724 "id": "TestResult", |
| 725 "properties": { |
| 726 "errorPosition": { |
| 727 "$ref": "SourcePosition", |
| 728 "description": "Position in the `Source` or `Ruleset` where
the principle runtime error\noccurs.\n\nEvaluation of an expression may result i
n an error. Rules are deny by\ndefault, so a `DENY` expectation when an error is
generated is valid.\nWhen there is a `DENY` with an error, the `SourcePosition`
is returned.\n\nE.g. `error_position { line: 19 column: 37 }`" |
| 729 }, |
| 730 "functionCalls": { |
| 731 "description": "The set of function calls made to service-de
fined methods.\n\nFunction calls are included in the order in which they are enc
ountered\nduring evaluation, are provided for both mocked and unmocked functions
,\nand included on the response regardless of the test `state`.", |
| 732 "items": { |
| 733 "$ref": "FunctionCall" |
| 734 }, |
| 735 "type": "array" |
| 736 }, |
| 737 "state": { |
| 738 "description": "State of the test.", |
| 739 "enum": [ |
| 740 "STATE_UNSPECIFIED", |
| 741 "SUCCESS", |
| 742 "FAILURE" |
| 743 ], |
| 744 "enumDescriptions": [ |
| 745 "Test state is not set.", |
| 746 "Test is a success.", |
| 747 "Test is a failure." |
| 748 ], |
| 749 "type": "string" |
| 750 }, |
| 751 "debugMessages": { |
| 752 "description": "Debug messages related to test execution iss
ues encountered during\nevaluation.\n\nDebug messages may be related to too many
or too few invocations of\nfunction mocks or to runtime errors that occur durin
g evaluation.\n\nFor example: ```Unable to read variable [name: \"resource\"]```
", |
| 753 "items": { |
| 754 "type": "string" |
| 755 }, |
| 756 "type": "array" |
| 757 } |
| 758 }, |
| 759 "type": "object" |
| 760 }, |
| 761 "ListRulesetsResponse": { |
| 762 "description": "The response for FirebaseRulesService.ListRulesets."
, |
| 763 "id": "ListRulesetsResponse", |
| 764 "properties": { |
| 765 "rulesets": { |
| 766 "description": "List of `Ruleset` instances.", |
| 767 "items": { |
| 768 "$ref": "Ruleset" |
| 769 }, |
| 770 "type": "array" |
| 771 }, |
| 772 "nextPageToken": { |
| 773 "description": "The pagination token to retrieve the next pa
ge of results. If the value is\nempty, no further results remain.", |
| 774 "type": "string" |
| 775 } |
| 776 }, |
| 777 "type": "object" |
| 778 }, |
| 779 "Arg": { |
| 780 "description": "Arg matchers for the mock function.", |
| 781 "id": "Arg", |
| 782 "properties": { |
| 783 "exactValue": { |
| 784 "description": "Argument exactly matches value provided.", |
| 785 "type": "any" |
| 786 }, |
| 787 "anyValue": { |
| 788 "$ref": "Empty", |
| 789 "description": "Argument matches any value provided." |
| 790 } |
| 791 }, |
| 792 "type": "object" |
| 793 }, |
| 794 "TestSuite": { |
| 795 "description": "`TestSuite` is a collection of `TestCase` instances
that validate the logical\ncorrectness of a `Ruleset`. The `TestSuite` may be re
ferenced in-line within\na `TestRuleset` invocation or as part of a `Release` ob
ject as a pre-release\ncheck.", |
| 796 "id": "TestSuite", |
| 797 "properties": { |
| 798 "testCases": { |
| 799 "description": "Collection of test cases associated with the
`TestSuite`.", |
| 800 "items": { |
| 801 "$ref": "TestCase" |
| 802 }, |
| 803 "type": "array" |
698 } | 804 } |
699 }, | 805 }, |
700 "type": "object" | 806 "type": "object" |
701 } | 807 } |
702 }, | 808 }, |
703 "servicePath": "", | 809 "servicePath": "", |
704 "title": "Firebase Rules API", | 810 "title": "Firebase Rules API", |
705 "version": "v1" | 811 "version": "v1" |
706 } | 812 } |
OLD | NEW |