-
Notifications
You must be signed in to change notification settings - Fork 0
/
openapi.yaml
188 lines (188 loc) · 4.23 KB
/
openapi.yaml
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
# [START swagger]
swagger: "2.0"
info:
description: "A simple Google Cloud Endpoints API example."
title: "Endpoints Example"
version: "1.1.0"
host: "scores-api.endpoints.rugby-scores-7.cloud.goog"
# [END swagger]
basePath: "/"
consumes:
- "application/json"
produces:
- "application/json"
schemes:
- "http"
security:
- api_key: []
paths:
"/echo":
post:
description: "Echo back a given message."
operationId: "echo"
produces:
- "application/json"
responses:
200:
description: "Echo"
schema:
$ref: "#/definitions/echoMessage"
parameters:
- description: "Message to echo"
in: body
name: message
required: true
schema:
$ref: "#/definitions/echoMessage"
security:
- api_key: []
/pilot:
get:
tags:
- pilot
operationId: findPilots
parameters:
- name: since
in: query
type: integer
format: int64
- name: limit
in: query
type: integer
format: int32
default: 20
responses:
200:
description: list the pilots
schema:
type: array
items:
$ref: "#/definitions/pilot"
default:
description: generic error response
schema:
$ref: "#/definitions/error"
post:
tags:
- pilot
operationId: addOnePilot
parameters:
- name: body
in: body
schema:
$ref: "#/definitions/pilot"
responses:
201:
description: Created
schema:
$ref: "#/definitions/pilot"
default:
description: error
schema:
$ref: "#/definitions/error"
/pilot/{id}:
parameters:
- type: integer
format: int64
name: id
in: path
required: true
put:
tags:
- pilot
operationId: updateOnePilot
parameters:
- name: body
in: body
schema:
$ref: "#/definitions/pilot"
responses:
200:
description: OK
schema:
$ref: "#/definitions/pilot"
default:
description: error
schema:
$ref: "#/definitions/error"
delete:
tags:
- pilot
operationId: destroyOnePilot
responses:
204:
description: Deleted
default:
description: error
schema:
$ref: "#/definitions/error"
"/auth/info/firebase":
get:
description: "Returns the requests' authentication information."
operationId: "authInfoFirebase"
produces:
- "application/json"
responses:
200:
description: "Authentication info."
schema:
$ref: "#/definitions/authInfoResponse"
security:
- firebase: []
definitions:
pilot:
type: object
properties:
id:
type: integer
format: int64
readOnly: true
firstName:
type: string
lastName:
type: string
licensed:
type: boolean
createdAt:
type: string
format: date-time
lastModified:
type: string
format: date-time
echoMessage:
properties:
message:
type: "string"
authInfoResponse:
properties:
id:
type: "string"
email:
type: "string"
principal:
type: string
error:
type: object
required:
- message
properties:
code:
type: integer
format: int64
message:
type: string
# This section requires all requests to any path to require an API key.
securityDefinitions:
# This section configures basic authentication with an API key.
api_key:
type: "apiKey"
name: "key"
in: "query"
# This section configures authentication using Firebase Auth.
firebase:
authorizationUrl: "https://changemeplz.com"
flow: "implicit"
type: "oauth2"
x-google-issuer: "https://securetoken.google.com/rugby-scores-7"
x-google-jwks_uri: "https://www.googleapis.com/service_accounts/v1/metadata/x509/securetoken@system.gserviceaccount.com"
x-google-audiences: "rugby-scores-7"