Skip to content

Commit 87d6d84

Browse files
chore: Generate the JSON Schema
1 parent 69ec94c commit 87d6d84

File tree

6 files changed

+648
-0
lines changed

6 files changed

+648
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ This repository contains definitions for the following CloudEvent data payloads:
154154
|Google Analytics for Firebase|[Proto](proto/google/events/firebase/analytics/v1/data.proto) / [JSON](https://googleapis.github.io/google-cloudevents/jsonschema/google/events/firebase/analytics/v1/AnalyticsLogData.json)|<br>Data Type:<br>`google.events.firebase.analytics.v1.AnalyticsLogData`<br>CloudEvent Type(s):<br>`google.firebase.analytics.log.v1.written`|
155155
|Firebase Authentication|[Proto](proto/google/events/firebase/auth/v1/data.proto) / [JSON](https://googleapis.github.io/google-cloudevents/jsonschema/google/events/firebase/auth/v1/AuthEventData.json)|<br>Data Type:<br>`google.events.firebase.auth.v1.AuthEventData`<br>CloudEvent Type(s):<br>`google.firebase.auth.user.v1.created`<br/>`google.firebase.auth.user.v1.deleted`|
156156
|Firebase Realtime Database|[Proto](proto/google/events/firebase/database/v1/data.proto) / [JSON](https://googleapis.github.io/google-cloudevents/jsonschema/google/events/firebase/database/v1/ReferenceEventData.json)|<br>Data Type:<br>`google.events.firebase.database.v1.ReferenceEventData`<br>CloudEvent Type(s):<br>`google.firebase.database.ref.v1.created`<br/>`google.firebase.database.ref.v1.updated`<br/>`google.firebase.database.ref.v1.deleted`<br/>`google.firebase.database.ref.v1.written`|
157+
|Firebase Data Connect|[Proto](proto/google/events/firebase/dataconnect/v1/data.proto) / [JSON](https://googleapis.github.io/google-cloudevents/jsonschema/google/events/firebase/dataconnect/v1/ConnectorEventData.json)|<br>Data Type:<br>`google.events.firebase.dataconnect.v1.ConnectorEventData`<br>CloudEvent Type(s):<br>`google.firebase.dataconnect.connector.v1.created`<br/>`google.firebase.dataconnect.connector.v1.updated`<br/>`google.firebase.dataconnect.connector.v1.deleted`|
158+
|Firebase Data Connect|[Proto](proto/google/events/firebase/dataconnect/v1/data.proto) / [JSON](https://googleapis.github.io/google-cloudevents/jsonschema/google/events/firebase/dataconnect/v1/MutationEventData.json)|<br>Data Type:<br>`google.events.firebase.dataconnect.v1.MutationEventData`<br>CloudEvent Type(s):<br>`google.firebase.dataconnect.connector.v1.mutationExecuted`|
159+
|Firebase Data Connect|[Proto](proto/google/events/firebase/dataconnect/v1/data.proto) / [JSON](https://googleapis.github.io/google-cloudevents/jsonschema/google/events/firebase/dataconnect/v1/SchemaEventData.json)|<br>Data Type:<br>`google.events.firebase.dataconnect.v1.SchemaEventData`<br>CloudEvent Type(s):<br>`google.firebase.dataconnect.schema.v1.created`<br/>`google.firebase.dataconnect.schema.v1.updated`<br/>`google.firebase.dataconnect.schema.v1.deleted`|
160+
|Firebase Data Connect|[Proto](proto/google/events/firebase/dataconnect/v1/data.proto) / [JSON](https://googleapis.github.io/google-cloudevents/jsonschema/google/events/firebase/dataconnect/v1/ServiceEventData.json)|<br>Data Type:<br>`google.events.firebase.dataconnect.v1.ServiceEventData`<br>CloudEvent Type(s):<br>`google.firebase.dataconnect.service.v1.created`<br/>`google.firebase.dataconnect.service.v1.updated`<br/>`google.firebase.dataconnect.service.v1.deleted`|
157161
|Firebase Alerts|[Proto](proto/google/events/firebase/firebasealerts/v1/data.proto) / [JSON](https://googleapis.github.io/google-cloudevents/jsonschema/google/events/firebase/firebasealerts/v1/AlertData.json)|<br>Data Type:<br>`google.events.firebase.firebasealerts.v1.AlertData`<br>CloudEvent Type(s):<br>`google.firebase.firebasealerts.alerts.v1.published`|
158162
|Firebase Remote Config|[Proto](proto/google/events/firebase/remoteconfig/v1/data.proto) / [JSON](https://googleapis.github.io/google-cloudevents/jsonschema/google/events/firebase/remoteconfig/v1/RemoteConfigEventData.json)|<br>Data Type:<br>`google.events.firebase.remoteconfig.v1.RemoteConfigEventData`<br>CloudEvent Type(s):<br>`google.firebase.remoteconfig.remoteConfig.v1.updated`|
159163
|Firebase Test Lab|[Proto](proto/google/events/firebase/testlab/v1/data.proto) / [JSON](https://googleapis.github.io/google-cloudevents/jsonschema/google/events/firebase/testlab/v1/TestMatrixEventData.json)|<br>Data Type:<br>`google.events.firebase.testlab.v1.TestMatrixEventData`<br>CloudEvent Type(s):<br>`google.firebase.testlab.testMatrix.v1.completed`|

jsonschema/catalog.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1519,6 +1519,52 @@
15191519
"google.firebase.database.ref.v1.written"
15201520
]
15211521
},
1522+
{
1523+
"url": "https://googleapis.github.io/google-cloudevents/jsonschema/google/events/firebase/dataconnect/v1/ConnectorEventData.json",
1524+
"product": "Firebase Data Connect",
1525+
"name": "ConnectorEventData",
1526+
"description": "The data within all Connector events.",
1527+
"datatype": "google.events.firebase.dataconnect.v1.ConnectorEventData",
1528+
"cloudeventTypes": [
1529+
"google.firebase.dataconnect.connector.v1.created",
1530+
"google.firebase.dataconnect.connector.v1.updated",
1531+
"google.firebase.dataconnect.connector.v1.deleted"
1532+
]
1533+
},
1534+
{
1535+
"url": "https://googleapis.github.io/google-cloudevents/jsonschema/google/events/firebase/dataconnect/v1/MutationEventData.json",
1536+
"product": "Firebase Data Connect",
1537+
"name": "MutationEventData",
1538+
"description": "The data within all Mutation events.",
1539+
"datatype": "google.events.firebase.dataconnect.v1.MutationEventData",
1540+
"cloudeventTypes": [
1541+
"google.firebase.dataconnect.connector.v1.mutationExecuted"
1542+
]
1543+
},
1544+
{
1545+
"url": "https://googleapis.github.io/google-cloudevents/jsonschema/google/events/firebase/dataconnect/v1/SchemaEventData.json",
1546+
"product": "Firebase Data Connect",
1547+
"name": "SchemaEventData",
1548+
"description": "The data within all Schema events.",
1549+
"datatype": "google.events.firebase.dataconnect.v1.SchemaEventData",
1550+
"cloudeventTypes": [
1551+
"google.firebase.dataconnect.schema.v1.created",
1552+
"google.firebase.dataconnect.schema.v1.updated",
1553+
"google.firebase.dataconnect.schema.v1.deleted"
1554+
]
1555+
},
1556+
{
1557+
"url": "https://googleapis.github.io/google-cloudevents/jsonschema/google/events/firebase/dataconnect/v1/ServiceEventData.json",
1558+
"product": "Firebase Data Connect",
1559+
"name": "ServiceEventData",
1560+
"description": "The data within all Service events.",
1561+
"datatype": "google.events.firebase.dataconnect.v1.ServiceEventData",
1562+
"cloudeventTypes": [
1563+
"google.firebase.dataconnect.service.v1.created",
1564+
"google.firebase.dataconnect.service.v1.updated",
1565+
"google.firebase.dataconnect.service.v1.deleted"
1566+
]
1567+
},
15221568
{
15231569
"url": "https://googleapis.github.io/google-cloudevents/jsonschema/google/events/firebase/firebasealerts/v1/AlertData.json",
15241570
"product": "Firebase Alerts",
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
{
2+
"$id": "https://googleapis.github.io/google-cloudevents/jsonschema/google/events/firebase/dataconnect/v1/ConnectorEventData.json",
3+
"name": "ConnectorEventData",
4+
"examples": [],
5+
"package": "google.events.firebase.dataconnect.v1",
6+
"datatype": "google.events.firebase.dataconnect.v1.ConnectorEventData",
7+
"cloudeventTypes": [
8+
"google.firebase.dataconnect.connector.v1.created",
9+
"google.firebase.dataconnect.connector.v1.updated",
10+
"google.firebase.dataconnect.connector.v1.deleted"
11+
],
12+
"product": "Firebase Data Connect",
13+
"$schema": "http://json-schema.org/draft-04/schema#",
14+
"$ref": "#/definitions/ConnectorEventData",
15+
"definitions": {
16+
"ConnectorEventData": {
17+
"properties": {
18+
"payload": {
19+
"$ref": "#/definitions/Connector",
20+
"additionalProperties": true,
21+
"description": "Optional. The Connector event payload. Unset for deletion events."
22+
}
23+
},
24+
"additionalProperties": true,
25+
"type": "object",
26+
"title": "Connector Event Data",
27+
"description": "The data within all Connector events."
28+
},
29+
"Connector": {
30+
"properties": {
31+
"name": {
32+
"type": "string",
33+
"description": "Identifier. The relative resource name of the connector, in the format: ``` projects/{project}/locations/{location}/services/{service}/connectors/{connector} ```"
34+
},
35+
"createTime": {
36+
"type": "string",
37+
"description": "Output only. [Output only] Create time stamp.",
38+
"format": "date-time"
39+
},
40+
"updateTime": {
41+
"type": "string",
42+
"description": "Output only. [Output only] Update time stamp.",
43+
"format": "date-time"
44+
},
45+
"labels": {
46+
"additionalProperties": {
47+
"type": "string"
48+
},
49+
"type": "object",
50+
"description": "Optional. Labels as key value pairs."
51+
},
52+
"annotations": {
53+
"additionalProperties": {
54+
"type": "string"
55+
},
56+
"type": "object",
57+
"description": "Optional. Stores small amounts of arbitrary data."
58+
},
59+
"source": {
60+
"$ref": "#/definitions/Source",
61+
"additionalProperties": true,
62+
"description": "Required. The source files that comprise the connector."
63+
},
64+
"uid": {
65+
"type": "string",
66+
"description": "Output only. System-assigned, unique identifier."
67+
},
68+
"reconciling": {
69+
"type": "boolean",
70+
"description": "Output only. A field that if true, indicates that the system is working to compile and deploy the connector."
71+
},
72+
"displayName": {
73+
"type": "string",
74+
"description": "Optional. Mutable human-readable name. 63 character limit."
75+
},
76+
"etag": {
77+
"type": "string",
78+
"description": "Output only. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. [AIP-154](https://google.aip.dev/154)"
79+
}
80+
},
81+
"additionalProperties": true,
82+
"type": "object",
83+
"title": "Connector",
84+
"description": "Connector consists of a set of operations, i.e. queries and mutations."
85+
},
86+
"File": {
87+
"properties": {
88+
"path": {
89+
"type": "string",
90+
"description": "Required. The file name including folder path, if applicable. The path should be relative to a local workspace (e.g. dataconnect/(schema|connector)/*.gql) and not an absolute path (e.g. /absolute/path/(schema|connector)/*.gql)."
91+
},
92+
"content": {
93+
"type": "string",
94+
"description": "Required. The file's textual content."
95+
}
96+
},
97+
"additionalProperties": true,
98+
"type": "object",
99+
"title": "File",
100+
"description": "Individual files."
101+
},
102+
"Source": {
103+
"properties": {
104+
"files": {
105+
"items": {
106+
"$ref": "#/definitions/File"
107+
},
108+
"type": "array",
109+
"description": "Required. The files that comprise the source set."
110+
}
111+
},
112+
"additionalProperties": true,
113+
"type": "object",
114+
"title": "Source",
115+
"description": "Used to represent a set of source files."
116+
}
117+
}
118+
}
Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
{
2+
"$id": "https://googleapis.github.io/google-cloudevents/jsonschema/google/events/firebase/dataconnect/v1/MutationEventData.json",
3+
"name": "MutationEventData",
4+
"examples": [],
5+
"package": "google.events.firebase.dataconnect.v1",
6+
"datatype": "google.events.firebase.dataconnect.v1.MutationEventData",
7+
"cloudeventTypes": [
8+
"google.firebase.dataconnect.connector.v1.mutationExecuted"
9+
],
10+
"product": "Firebase Data Connect",
11+
"$schema": "http://json-schema.org/draft-04/schema#",
12+
"$ref": "#/definitions/MutationEventData",
13+
"definitions": {
14+
"MutationEventData": {
15+
"properties": {
16+
"payload": {
17+
"$ref": "#/definitions/Mutation",
18+
"additionalProperties": true
19+
}
20+
},
21+
"additionalProperties": true,
22+
"type": "object",
23+
"title": "Mutation Event Data",
24+
"description": "The data within all Mutation events."
25+
},
26+
"GraphqlError": {
27+
"properties": {
28+
"message": {
29+
"type": "string",
30+
"description": "The detailed error message. The message should help developer understand the underlying problem without leaking internal data."
31+
},
32+
"locations": {
33+
"items": {
34+
"$ref": "#/definitions/SourceLocation"
35+
},
36+
"type": "array",
37+
"description": "The source locations where the error occurred. Locations should help developers and toolings identify the source of error quickly. Included in admin endpoints (`ExecuteGraphql`, `ExecuteGraphqlRead`, `UpdateSchema` and `UpdateConnector`) to reference the provided GraphQL GQL document. Omitted in `ExecuteMutation` and `ExecuteQuery` since the caller shouldn't have access access the underlying GQL source."
38+
},
39+
"path": {
40+
"properties": {
41+
"values": {
42+
"items": {
43+
"oneOf": [
44+
{
45+
"type": "array"
46+
},
47+
{
48+
"type": "boolean"
49+
},
50+
{
51+
"type": "number"
52+
},
53+
{
54+
"type": "object"
55+
},
56+
{
57+
"type": "string"
58+
}
59+
],
60+
"title": "Value",
61+
"description": "`Value` represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values. A producer of value is expected to set one of that variants, absence of any variant indicates an error. The JSON representation for `Value` is JSON value."
62+
},
63+
"type": "array",
64+
"description": "Repeated field of dynamically typed values."
65+
}
66+
},
67+
"additionalProperties": true,
68+
"type": "object",
69+
"description": "The result field which could not be populated due to error. Clients can use path to identify whether a null result is intentional or caused by a runtime error. It should be a list of string or index from the root of GraphQL query document."
70+
},
71+
"extensions": {
72+
"$ref": "#/definitions/GraphqlErrorExtensions",
73+
"additionalProperties": true,
74+
"description": "Additional error information."
75+
}
76+
},
77+
"additionalProperties": true,
78+
"type": "object",
79+
"title": "Graphql Error",
80+
"description": "GraphqlError contains the error information of a GraphQL query or mutation."
81+
},
82+
"GraphqlErrorExtensions": {
83+
"properties": {
84+
"file": {
85+
"type": "string",
86+
"description": "The source file name where the error occurred. Included only for `UpdateSchema` and `UpdateConnector`, it corresponds to `File.path` of the provided `Source`."
87+
},
88+
"code": {
89+
"enum": [
90+
"OK",
91+
0,
92+
"CANCELLED",
93+
1,
94+
"UNKNOWN",
95+
2,
96+
"INVALID_ARGUMENT",
97+
3,
98+
"DEADLINE_EXCEEDED",
99+
4,
100+
"NOT_FOUND",
101+
5,
102+
"ALREADY_EXISTS",
103+
6,
104+
"PERMISSION_DENIED",
105+
7,
106+
"UNAUTHENTICATED",
107+
16,
108+
"RESOURCE_EXHAUSTED",
109+
8,
110+
"FAILED_PRECONDITION",
111+
9,
112+
"ABORTED",
113+
10,
114+
"OUT_OF_RANGE",
115+
11,
116+
"UNIMPLEMENTED",
117+
12,
118+
"INTERNAL",
119+
13,
120+
"UNAVAILABLE",
121+
14,
122+
"DATA_LOSS",
123+
15
124+
],
125+
"oneOf": [
126+
{
127+
"type": "string"
128+
},
129+
{
130+
"type": "integer"
131+
}
132+
],
133+
"title": "Code",
134+
"description": "The canonical error codes for gRPC APIs. Sometimes multiple error codes may apply. Services should return the most specific error code that applies. For example, prefer `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply. Similarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`."
135+
},
136+
"debugDetails": {
137+
"type": "string",
138+
"description": "More detailed error message to assist debugging. It contains application business logic that are inappropriate to leak publicly. In the emulator, Data Connect API always includes it to assist local development and debugging. In the backend, ConnectorService always hides it. GraphqlService without impersonation always include it. GraphqlService with impersonation includes it only if explicitly opted-in with `include_debug_details` in `GraphqlRequestExtensions`."
139+
}
140+
},
141+
"additionalProperties": true,
142+
"type": "object",
143+
"title": "Graphql Error Extensions",
144+
"description": "GraphqlErrorExtensions contains additional information of `GraphqlError`."
145+
},
146+
"Mutation": {
147+
"properties": {
148+
"data": {
149+
"additionalProperties": true,
150+
"type": "object",
151+
"description": "The result of the execution of the requested operation. If an error was raised before execution begins, the data entry should not be present in the result. (a request error: https://spec.graphql.org/draft/#sec-Errors.Request-Errors) If an error was raised during the execution that prevented a valid response, the data entry in the response should be null. (a field error: https://spec.graphql.org/draft/#sec-Errors.Error-Result-Format)"
152+
},
153+
"variables": {
154+
"additionalProperties": true,
155+
"type": "object",
156+
"description": "Values for GraphQL variables provided in this request."
157+
},
158+
"errors": {
159+
"items": {
160+
"$ref": "#/definitions/GraphqlError"
161+
},
162+
"type": "array",
163+
"description": "Errors of this response. If the data entry in the response is not present, the errors entry must be present. It conforms to https://spec.graphql.org/draft/#sec-Errors."
164+
}
165+
},
166+
"additionalProperties": true,
167+
"type": "object",
168+
"title": "Mutation"
169+
},
170+
"SourceLocation": {
171+
"properties": {
172+
"line": {
173+
"type": "integer",
174+
"description": "Line number starting at 1."
175+
},
176+
"column": {
177+
"type": "integer",
178+
"description": "Column number starting at 1."
179+
}
180+
},
181+
"additionalProperties": true,
182+
"type": "object",
183+
"title": "Source Location",
184+
"description": "SourceLocation references a location in a GraphQL source."
185+
}
186+
}
187+
}

0 commit comments

Comments
 (0)