-
Notifications
You must be signed in to change notification settings - Fork 31
/
openapi-v2.yml
278 lines (278 loc) · 7.94 KB
/
openapi-v2.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
swagger: "2.0"
info:
title: "playground-api Playground Service"
description: "Playground Service definition hosted by Cloud Endpoints with a Cloud Run backend"
version: "1.0.0"
host: api.ashdavies.dev
schemes:
- "https"
consumes:
- "application/json"
produces:
- "application/json"
paths:
/.well-known/assetlinks.json:
get:
tags: [ "static" ]
summary: "Returns AssetLinks protocol file"
operationId: "getAssetLinks"
responses:
"200":
description: "OK"
security: []
/events/upcoming:
get:
tags: [ "events" ]
summary: "Return upcoming events by start date"
operationId: "getUpcomingEvents"
parameters:
- name: "startAt"
in: "query"
type: "string"
format: "date"
description: "The start date to start this query at."
- name: "limit"
in: "query"
type: "integer"
format: "int32"
description: "The maximum number of items to return."
responses:
"200":
description: "OK"
schema:
type: "array"
items:
$ref: "#/definitions/Event"
security:
- ApiKeyAuth: [ ]
AppCheckAuth: [ ]
/events:aggregate:
post:
tags: [ "events" ]
summary: "Aggregate events from data sources"
operationId: "aggregateEvents"
responses:
"200":
description: "OK"
security:
- ApiKeyAuth: [ ]
AppCheckAuth: [ ]
/firebase/auth:
post:
tags: [ "firebase" ]
summary: "Signs in or signs up a user"
description: >
Signs in or signs up a user by exchanging a custom Auth token for the given UID. Upon a
successful sign-in or sign-up, a new Identity Platform ID token and refresh token are
issued for the user.
operationId: "signIn"
parameters:
- name: "body"
in: "body"
required: true
schema:
type: "object"
required:
- "uid"
properties:
uid:
type: "string"
description: >
The UID to store in the token. This identifies the user to other Firebase
services (Realtime Database, Firebase Auth, etc.). Should be less than 128
characters.
example: "[email protected]"
responses:
"200":
description: "OK"
schema:
$ref: "#/definitions/AuthResult"
/firebase/token:
post:
tags: [ "firebase" ]
summary: "Creates a new App Check token"
operationId: "createToken"
parameters:
- name: "body"
in: "body"
required: true
schema:
$ref: "#/definitions/FirebaseApp"
responses:
"200":
description: "OK"
schema:
$ref: "#/definitions/AppCheckToken"
/firebase/token:verify:
put:
tags: [ "firebase" ]
summary: "Verifies an App Check token"
description: >
Verifies a Firebase App Check token (JWT). If the token is valid, the promise is fulfilled
with the token's decoded claims; otherwise, the promise is rejected.
operationId: "verifyToken"
parameters:
- name: "X-Firebase-AppCheck"
in: "header"
description: "The App Check token to verify"
required: true
type: "string"
responses:
"200":
description: "OK"
schema:
$ref: "#/definitions/DecodedToken"
"400":
description: "Request is missing app check token header"
/hello:
get:
tags: [ "hello" ]
summary: "Greet the user"
operationId: "helloWorld"
responses:
"200":
description: "OK"
definitions:
AppCheckToken:
type: "object"
required:
- "ttlMillis"
- "token"
properties:
ttlMillis:
type: "integer"
format: "int64"
description: "The time-to-live duration of the token in milliseconds"
token:
type: "string"
description: "The Firebase App Check token"
AuthResult:
type: "object"
properties:
idToken:
type: "string"
description: "A Firebase Auth ID token generated from the provided custom token."
refreshToken:
type: "string"
description: "A Firebase Auth refresh token generated from the provided custom token."
expiresIn:
type: "integer"
format: "int64"
description: "The number of seconds in which the ID token expires."
example: 3600
DecodedToken:
type: "object"
required:
- "audience"
- "expiresAt"
- "issuedAt"
- "subject"
- "issuer"
- "appId"
properties:
audience:
type: "array"
description: >
The audience for which this token is intended. This value is a JSON array of two strings,
the first is the project number of your Firebase project, and the second is the project
ID of the same project.
items:
type: "string"
expiresAt:
type: "integer"
format: "int64"
description: >
The App Check token's expiration time, in seconds since the Unix epoch. That is, the time
at which this App Check token expires and should no longer be considered valid.
example: "1672497116"
issuedAt:
type: "integer"
format: "int64"
description: >
The App Check token's issued-at time, in seconds since the Unix epoch. That is, the time
at which this App Check token was issued and should start to be considered valid.
example: "1672493516"
subject:
type: "string"
description: >
The Firebase App ID corresponding to the app the token belonged to. As a convenience,
this value is copied over to the | app_id property.
example: "1:1234567890:android:321abc456def7890"
issuer:
type: "string"
description: >
The issuer identifier for the issuer of the response. This value is a URL with the format
https://firebaseappcheck.googleapis.com/<PROJECT_NUMBER>, where <PROJECT_NUMBER> is the
same project number specified in the | aud property.
example: "https://firebaseappcheck.googleapis.com/1234567890"
appId:
type: "string"
description: >
The App ID corresponding to the App the App Check token belonged to. This value is not
actually one of the JWT token claims. It is added as a convenience, and is set as the
value of the | sub property.
example: "1:1234567890:android:321abc456def7890"
Event:
type: "object"
required:
- "id"
- "name"
- "website"
- "location"
- "dateStart"
- "dateEnd"
properties:
id:
type: "string"
name:
type: "string"
website:
type: "string"
location:
type: "string"
imageUrl:
type: "string"
status:
type: "string"
online:
type: "boolean"
dateStart:
type: "string"
format: "date"
dateEnd:
type: "string"
format: "date"
cfp:
type: "object"
properties:
start:
type: "string"
format: "date"
end:
type: "string"
format: "date"
site:
type: "string"
FirebaseApp:
type: "object"
required:
- "appId"
properties:
appId:
type: "string"
description: "The app ID to use as the JWT app_id"
example: "1:1234567890:android:321abc456def7890"
securityDefinitions:
ApiKeyAuth:
name: "X-API-Key"
type: "apiKey"
in: "header"
AppCheckAuth:
name: "X-Firebase-AppCheck"
type: "apiKey"
in: "header"
security:
- ApiKeyAuth: [ ]
x-google-backend:
address: "${backend_service_name}"
protocol: "h2"