firebaserules.projects.test

POST {{baseUrl}}/v1/{{name}}:test?$.xgafv=<string>&access_token=<string>&alt=<string>&callback=<string>&fields=<string>&key=<string>&oauth_token=<string>&prettyPrint=<boolean>&quotaUser=<string>&upload_protocol=<string>&uploadType=<string>

Test Source for syntactic and semantic correctness. Issues present, if any, will be returned to the caller with a description, severity, and source location. The test method may be executed with Source or a Ruleset name. Passing Source is useful for unit testing new rules. Passing a Ruleset name is useful for regression testing an existing rule. The following is an example of Source that permits users to upload images to a bucket bearing their user id and matching the correct metadata: Example // Users are allowed to subscribe and unsubscribe to the blog. service firebase.storage { match /users/{userId}/images/{imageName} { allow write: if userId == request.auth.uid && (imageName.matches('.png$') || imageName.matches('.jpg$')) && resource.mimeType.matches('image/') } }

Request Params

KeyDatatypeRequiredDescription
$.xgafvstringV1 error format.
access_tokenstringOAuth access token.
altstringData format for response.
callbackstringJSONP
fieldsstringSelector specifying which fields to include in a partial response.
keystringAPI key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
oauth_tokenstringOAuth 2.0 token for the current user.
prettyPrintstringReturns response with indentations and line breaks.
quotaUserstringAvailable to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
upload_protocolstringUpload protocol for media (e.g. "raw", "multipart").
uploadTypestringLegacy upload protocol for media (e.g. "media", "multipart").

Request Body

{"source"=>{"files"=>[{"content"=>"in", "fingerprint"=>"amet aliqua", "name"=>"lab"}, {"content"=>"minim d", "fingerprint"=>"ea aliquip", "name"=>"laboris"}]}, "testSuite"=>{"testCases"=>[{"expectation"=>"<string>", "expressionReportLevel"=>"<string>", "functionMocks"=>[{"args"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "function"=>"<string>", "result"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}}, {"args"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "function"=>"<string>", "result"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}}], "pathEncoding"=>"<string>"}, {"expectation"=>"<string>", "expressionReportLevel"=>"<string>", "functionMocks"=>[{"args"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "function"=>"<string>", "result"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}}, {"args"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "function"=>"<string>", "result"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}}], "pathEncoding"=>"<string>"}]}}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring

RESPONSES

status: OK

{&quot;issues&quot;:[{&quot;description&quot;:&quot;consequat et minim amet&quot;,&quot;severity&quot;:&quot;SEVERITY_UNSPECIFIED&quot;,&quot;sourcePosition&quot;:{&quot;column&quot;:-24333018,&quot;currentOffset&quot;:-70054847,&quot;endOffset&quot;:-74657084,&quot;fileName&quot;:&quot;nulla veniam cupidatat in&quot;,&quot;line&quot;:-84400151}},{&quot;description&quot;:&quot;adipisicing in quis minim anim&quot;,&quot;severity&quot;:&quot;WARNING&quot;,&quot;sourcePosition&quot;:{&quot;column&quot;:-54700024,&quot;currentOffset&quot;:90537493,&quot;endOffset&quot;:35802054,&quot;fileName&quot;:&quot;sit culpa&quot;,&quot;line&quot;:-32201766}}],&quot;testResults&quot;:[{&quot;debugMessages&quot;:[&quot;Ut consequat id&quot;,&quot;enim nisi&quot;],&quot;errorPosition&quot;:{&quot;column&quot;:-57715626,&quot;currentOffset&quot;:-20207326,&quot;endOffset&quot;:-96682640,&quot;fileName&quot;:&quot;pariatur anim dolore esse&quot;,&quot;line&quot;:34757370},&quot;expressionReports&quot;:[{&quot;children&quot;:[{&quot;value&quot;:&quot;\u003cCircular reference to #/components/schemas/ExpressionReport detected\u003e&quot;},{&quot;value&quot;:&quot;\u003cCircular reference to #/components/schemas/ExpressionReport detected\u003e&quot;}],&quot;sourcePosition&quot;:{&quot;column&quot;:-91586767,&quot;currentOffset&quot;:29155892,&quot;endOffset&quot;:26040005,&quot;fileName&quot;:&quot;enim aute consectetur&quot;,&quot;line&quot;:10234184},&quot;values&quot;:[{&quot;count&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;},&quot;value&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;}},{&quot;count&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;},&quot;value&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;}}]},{&quot;children&quot;:[{&quot;value&quot;:&quot;\u003cCircular reference to #/components/schemas/ExpressionReport detected\u003e&quot;},{&quot;value&quot;:&quot;\u003cCircular reference to #/components/schemas/ExpressionReport detected\u003e&quot;}],&quot;sourcePosition&quot;:{&quot;column&quot;:-42009335,&quot;currentOffset&quot;:70430622,&quot;endOffset&quot;:85809474,&quot;fileName&quot;:&quot;sit Lorem quis cupidatat non&quot;,&quot;line&quot;:-5479646},&quot;values&quot;:[{&quot;count&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;},&quot;value&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;}},{&quot;count&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;},&quot;value&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;}}]}],&quot;functionCalls&quot;:[{&quot;function&quot;:&quot;ut reprehenderit&quot;},{&quot;function&quot;:&quot;veniam aliqua dolore dolore&quot;}],&quot;state&quot;:&quot;FAILURE&quot;,&quot;visitedExpressions&quot;:[{&quot;sourcePosition&quot;:{&quot;column&quot;:-83926308,&quot;currentOffset&quot;:98241976,&quot;endOffset&quot;:90875942,&quot;fileName&quot;:&quot;ut est dolore&quot;,&quot;line&quot;:30027083},&quot;value&quot;:{}},{&quot;sourcePosition&quot;:{&quot;column&quot;:74571617,&quot;currentOffset&quot;:51005806,&quot;endOffset&quot;:-71593396,&quot;fileName&quot;:&quot;quis dolore nisi ve&quot;,&quot;line&quot;:-32764863},&quot;value&quot;:{}}]},{&quot;debugMessages&quot;:[&quot;quis veniam Excepteur&quot;,&quot;sed commodo consequat reprehenderit&quot;],&quot;errorPosition&quot;:{&quot;column&quot;:-51665709,&quot;currentOffset&quot;:-42073200,&quot;endOffset&quot;:32987214,&quot;fileName&quot;:&quot;incididunt cupidatat adipisicing&quot;,&quot;line&quot;:-22961905},&quot;expressionReports&quot;:[{&quot;children&quot;:[{&quot;value&quot;:&quot;\u003cCircular reference to #/components/schemas/ExpressionReport detected\u003e&quot;},{&quot;value&quot;:&quot;\u003cCircular reference to #/components/schemas/ExpressionReport detected\u003e&quot;}],&quot;sourcePosition&quot;:{&quot;column&quot;:-25511998,&quot;currentOffset&quot;:-51530392,&quot;endOffset&quot;:-81484881,&quot;fileName&quot;:&quot;nulla ut esse&quot;,&quot;line&quot;:50936218},&quot;values&quot;:[{&quot;count&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;},&quot;value&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;}},{&quot;count&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;},&quot;value&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;}}]},{&quot;children&quot;:[{&quot;value&quot;:&quot;\u003cCircular reference to #/components/schemas/ExpressionReport detected\u003e&quot;},{&quot;value&quot;:&quot;\u003cCircular reference to #/components/schemas/ExpressionReport detected\u003e&quot;}],&quot;sourcePosition&quot;:{&quot;column&quot;:-944288,&quot;currentOffset&quot;:-22090166,&quot;endOffset&quot;:33551649,&quot;fileName&quot;:&quot;in sint&quot;,&quot;line&quot;:43030136},&quot;values&quot;:[{&quot;count&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;},&quot;value&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;}},{&quot;count&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;},&quot;value&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;}}]}],&quot;functionCalls&quot;:[{&quot;function&quot;:&quot;ad non laboris ullam&quot;},{&quot;function&quot;:&quot;consequat Duis&quot;}],&quot;state&quot;:&quot;SUCCESS&quot;,&quot;visitedExpressions&quot;:[{&quot;sourcePosition&quot;:{&quot;column&quot;:10883082,&quot;currentOffset&quot;:22208853,&quot;endOffset&quot;:46852503,&quot;fileName&quot;:&quot;deserunt elit nostrud in eiusmod&quot;,&quot;line&quot;:49519799},&quot;value&quot;:{}},{&quot;sourcePosition&quot;:{&quot;column&quot;:48275376,&quot;currentOffset&quot;:42426189,&quot;endOffset&quot;:24846154,&quot;fileName&quot;:&quot;nulla eiusmod eu nostrud&quot;,&quot;line&quot;:96105676},&quot;value&quot;:{}}]}]}