Google Firebase · Schema
TestRulesetRequest
The request for FirebaseRulesService.TestRuleset.
AnalyticsAuthenticationBackend-as-a-ServiceCloud MessagingGoogle CloudHostingMobileReal-Time DatabaseIdentity Federation
Properties
| Name | Type | Description |
|---|---|---|
| testSuite | object | Required. The tests to execute against the `Source`. When `Source` is provided inline, the test cases will only be run if the `Source` is syntactically and semantically valid. Inline `TestSuite` to ru |
| source | object | Optional. Optional `Source` to be checked for correctness. This field must not be set when the resource name refers to a `Ruleset`. |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://artifacts.apis.io/google-firebase/json-schema/google-firebase-test-ruleset-request-schema.json",
"title": "TestRulesetRequest",
"description": "The request for FirebaseRulesService.TestRuleset.",
"x-generated": "2026-11-11",
"x-method": "derived",
"x-generator": "derive-json-schema.py",
"x-source": "openapi/google-firebase-firebaserules-projects-api-openapi.yml#/components/schemas/TestRulesetRequest",
"properties": {
"testSuite": {
"$ref": "#/$defs/TestSuite",
"description": "Required. The tests to execute against the `Source`. When `Source` is provided inline, the test cases will only be run if the `Source` is syntactically and semantically valid. Inline `TestSuite` to run."
},
"source": {
"$ref": "#/$defs/Source",
"description": "Optional. Optional `Source` to be checked for correctness. This field must not be set when the resource name refers to a `Ruleset`."
}
},
"type": "object",
"$defs": {
"Arg": {
"description": "Arg matchers for the mock function.",
"type": "object",
"properties": {
"exactValue": {
"description": "Argument exactly matches value provided."
},
"anyValue": {
"$ref": "#/$defs/Empty",
"description": "Argument matches any value provided."
}
}
},
"Empty": {
"properties": {},
"description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }",
"type": "object"
},
"File": {
"properties": {
"fingerprint": {
"format": "byte",
"type": "string",
"description": "Fingerprint (e.g. github sha) associated with the `File`."
},
"name": {
"description": "Required. File name.",
"type": "string"
},
"content": {
"description": "Required. Textual Content.",
"type": "string"
}
},
"description": "`File` containing source content.",
"type": "object"
},
"FunctionMock": {
"description": "Mock function definition. Mocks must refer to a function declared by the target service. The type of the function args and result will be inferred at test time. If either the arg or result values are not compatible with function type declaration, the request will be considered invalid. More than one `FunctionMock` may be provided for a given function name so long as the `Arg` matchers are distinct. There may be only one function for a given overload where all `Arg` values are `Arg.any_value`.",
"properties": {
"args": {
"items": {
"$ref": "#/$defs/Arg"
},
"description": "The list of `Arg` values to match. The order in which the arguments are provided is the order in which they must appear in the function invocation.",
"type": "array"
},
"result": {
"$ref": "#/$defs/Result",
"description": "The mock result of the function call."
},
"function": {
"description": "The name of the function. The function name must match one provided by a service declaration.",
"type": "string"
}
},
"type": "object"
},
"Result": {
"type": "object",
"properties": {
"undefined": {
"$ref": "#/$defs/Empty",
"description": "The result is undefined, meaning the result could not be computed."
},
"value": {
"description": "The result is an actual value. The type of the value must match that of the type declared by the service."
}
},
"description": "Possible result values from the function mock invocation."
},
"Source": {
"description": "`Source` is one or more `File` messages comprising a logical set of rules.",
"type": "object",
"properties": {
"files": {
"description": "Required. `File` set constituting the `Source` bundle.",
"items": {
"$ref": "#/$defs/File"
},
"type": "array"
}
}
},
"TestCase": {
"description": "`TestCase` messages provide the request context and an expectation as to whether the given context will be allowed or denied. Test cases may specify the `request`, `resource`, and `function_mocks` to mock a function call to a service-provided function. The `request` object represents context present at request-time. The `resource` is the value of the target resource as it appears in persistent storage before the request is executed.",
"properties": {
"expectation": {
"description": "Test expectation.",
"type": "string",
"enum": [
"EXPECTATION_UNSPECIFIED",
"ALLOW",
"DENY"
]
},
"expressionReportLevel": {
"type": "string",
"enum": [
"LEVEL_UNSPECIFIED",
"NONE",
"FULL",
"VISITED"
],
"description": "Specifies what should be included in the response."
},
"resource": {
"description": "Optional resource value as it appears in persistent storage before the request is fulfilled. The resource type depends on the `request.path` value."
},
"functionMocks": {
"type": "array",
"description": "Optional function mocks for service-defined functions. If not set, any service defined function is expected to return an error, which may or may not influence the test outcome.",
"items": {
"$ref": "#/$defs/FunctionMock"
}
},
"request": {
"description": "Request context. The exact format of the request context is service-dependent. See the appropriate service documentation for information about the supported fields and types on the request. Minimally, all services support the following fields and types: Request field | Type ---------------|----------------- auth.uid | `string` auth.token | `map` headers | `map` method | `string` params | `map` path | `string` time | `google.protobuf.Timestamp` If the request value is not well-formed for the service, the request will be rejected as an invalid argument."
},
"pathEncoding": {
"description": "Specifies whether paths (such as request.path) are encoded and how.",
"type": "string",
"enum": [
"ENCODING_UNSPECIFIED",
"URL_ENCODED",
"PLAIN"
]
}
},
"type": "object"
},
"TestSuite": {
"properties": {
"testCases": {
"description": "Collection of test cases associated with the `TestSuite`.",
"items": {
"$ref": "#/$defs/TestCase"
},
"type": "array"
}
},
"type": "object",
"description": "`TestSuite` is a collection of `TestCase` instances that validate the logical correctness of a `Ruleset`. The `TestSuite` may be referenced in-line within a `TestRuleset` invocation or as part of a `Release` object as a pre-release check."
}
}
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/google-firebase-test-ruleset-request"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.