-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathopenapi.yaml
318 lines (318 loc) · 9.48 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
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
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
openapi: 3.0.1
info:
description: |
The GA4GH Testbed Orchestrator is a system that brings together plugins that test implementations of services from the GA4GH Cloud (and eventually other) Work Stream. The orchestrator is designed to be a framework for running multiple tests within, and across services. For example, 1) the interoperability and integration tests across Workflow Execution Service (WES), Tool Registry Service (TRS), and Data Repository Service (DRS) APIs and also 2) specific compliance tests for implementations of individual APIs. By building the test infrastructure with a common Testbed Orchestrator, we can evolve how we test in the future while still leveraging a unified framework. This approach will not only make it much easier to aggregate results to a common GA4GH testing dashboard, but it will also reduce redundant code between testing efforts by factoring out orchestration to this effort.
title: GA4GH Testbed Orchestrator
version: 0.3.0
servers:
- url: /ga4gh/testbed/v1
tags:
- name: Plugins
description: |
Test Plugins are the core of the system. They are Python objects that conform to the Test Plugin interface and are used to execute a given test. They can be extremely simple or quite complex but, ultimately, they provide a very basic interface to the Orchestrator that’s calling them.
- name: Tests
description: |
Tests represent instantiations of test plugins submitted to be run by the testbed Orchestrator.
- name: Apis
description: |
APIs are based on abstract definitions for GA4GH standards and services. Each API is specified using OpenAPI/Swagger schemas, from which client functionality is provided in the testbed for communicating with servers.
- name: Servers
description: |
Servers include registered implementations of GA4GH APIs. These servers are the subjects (or targets) of tests run in the testbed.
paths:
/tests:
post:
description: |-
Create a new plugin run, either right now or with a schedule.
operationId: create_test
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceTest'
required: true
responses:
201:
content:
application/json:
schema:
type: string
description: Success — test created
summary: Create a new test
tags:
- Tests
x-codegen-request-body-name: body
x-openapi-router-controller: ga4ghtest.controllers.tests_controller
get:
description: |
Get the list of running or scheduled tests.
operationId: get_tests
parameters:
- $ref: '#/components/parameters/sortParam'
- $ref: '#/components/parameters/orderParam'
- $ref: '#/components/parameters/limitParam'
responses:
200:
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ServiceTest'
description: OK
summary: Get tests
tags:
- Tests
x-openapi-router-controller: ga4ghtest.controllers.tests_controller
/tests/{test_id}:
get:
description: |
Get the status of a given test run.
operationId: get_test_by_id
parameters:
- description: test ID
explode: false
in: path
name: test_id
required: true
schema:
type: string
example: user0
style: simple
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceTest'
description: OK
summary: Get a test
tags:
- Tests
x-openapi-router-controller: ga4ghtest.controllers.tests_controller
/plugins:
post:
description: |-
Add a plugin for testing functionality of an API.
operationId: create_plugin
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Plugin'
required: true
responses:
201:
content:
application/json:
schema:
type: string
description: Success — plugin created
summary: Create a test plugin
tags:
- Plugins
x-codegen-request-body-name: body
x-openapi-router-controller: ga4ghtest.controllers.plugins_controller
get:
description: |
Get the list of available test plugins.
operationId: get_plugins
parameters:
- $ref: '#/components/parameters/sortParam'
- $ref: '#/components/parameters/orderParam'
- $ref: '#/components/parameters/limitParam'
responses:
200:
content:
application/json:
schema:
type: string
description: OK
summary: Get test plugins
tags:
- Plugins
x-openapi-router-controller: ga4ghtest.controllers.plugins_controller
/apis:
get:
description: |
Get the list of available APIs.
operationId: get_apis
parameters:
- $ref: '#/components/parameters/sortParam'
- $ref: '#/components/parameters/orderParam'
- $ref: '#/components/parameters/limitParam'
responses:
200:
content:
application/json:
schema:
type: string
description: OK
summary: Get APIs
tags:
- Apis
x-openapi-router-controller: ga4ghtest.controllers.apis_controller
/servers:
post:
description: |-
Add an API server to the testbed.
operationId: register_server
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Server'
required: true
responses:
201:
content:
application/json:
schema:
type: string
description: Success — endpoint added
summary: Register a server
tags:
- Servers
x-codegen-request-body-name: body
x-openapi-router-controller: ga4ghtest.controllers.servers_controller
get:
description: |
Get the list of available servers.
operationId: get_servers
parameters:
- $ref: '#/components/parameters/sortParam'
- $ref: '#/components/parameters/orderParam'
- $ref: '#/components/parameters/limitParam'
responses:
200:
content:
application/json:
schema:
type: string
description: OK
summary: Get target servers
tags:
- Servers
x-openapi-router-controller: ga4ghtest.controllers.servers_controller
components:
parameters:
limitParam:
description: maximum number of records to return
explode: false
in: query
name: limit
required: false
schema:
default: 3
format: int32
maximum: 1000
minimum: 1
type: integer
style: form
sortParam:
description: logic by which to sort matched records
explode: false
in: query
name: sortBy
required: false
schema:
default: created_at
enum:
- created_at
type: string
style: form
orderParam:
description: sort order (ascending or descending)
explode: true
in: query
name: order
required: false
schema:
default: desc
enum:
- asc
- desc
type: string
style: form
schemas:
ServerID:
type: string
Server:
title: Server
type: object
required:
- api
- host
- proto
properties:
id:
$ref: '#/components/schemas/ServerID'
api:
type: string
enum:
- WES
- TRS
name:
type: string
host:
type: string
proto:
type: string
auth:
type: string
PluginID:
type: string
Plugin:
title: Plugin
type: object
properties:
id:
$ref: '#/components/schemas/PluginID'
name:
type: string
version:
type: string
api:
type: string
enum:
- WES
- TRS
recipeClass:
type: string
enum:
- requestCheck
recipe:
type: object
RequestRecipe:
title: RequestRecipe
type: object
properties:
request:
type: string
response:
type: string
ServiceTest:
title: Test
type: object
properties:
server_id:
$ref: '#/components/schemas/ServerID'
plugin_id:
$ref: '#/components/schemas/PluginID'
server:
$ref: '#/components/schemas/Server'
plugin:
$ref: '#/components/schemas/Plugin'
example:
server:
api: WES
host: 0.0.0.0:8082
proto: http
plugin:
name: WES service-info
api: WES
version: "0.0.1"
recipeClass: requestCheck
recipe:
request: service-info
response: "{\"supported_filesystem_protocols\": [\"file\", \"http\", \"https\"], \"supported_wes_versions\": [\"0.3.0\", \"1.0.0\"], \"system_state_counts\": {}, \"tags\": {}, \"workflow_engine_versions\": {\"cwl-runner\": \"b''\"}, \"workflow_type_versions\": {\"CWL\": {\"workflow_type_version\": [\"v1.0\"]}}}"