Skip to content

Commit 6ea4a3f

Browse files
committed
style(openapi): exclude OpenAPI specs from Prettier formatting (#518)
The OpenAPI specification files are copied from their canonical locations in the reana-server, reana-job-controller, and reana-workflow-controller component repositories. Excluding them from Prettier formatting ensures they remain identical to their sources.
1 parent 4ea6e38 commit 6ea4a3f

4 files changed

Lines changed: 318 additions & 98 deletions

File tree

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.pytest_cache
22
CHANGELOG.md
3+
reana_commons/openapi_specifications

reana_commons/openapi_specifications/reana_job_controller.json

Lines changed: 42 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,9 @@
171171
"type": "string"
172172
}
173173
],
174-
"produces": ["application/json"],
174+
"produces": [
175+
"application/json"
176+
],
175177
"responses": {
176178
"200": {
177179
"description": "Request succeeded. Returns boolean depicting if job is in cache.",
@@ -196,7 +198,9 @@
196198
"get": {
197199
"description": "This resource is not expecting parameters and it will return a list representing all active jobs in JSON format.",
198200
"operationId": "get_jobs",
199-
"produces": ["application/json"],
201+
"produces": [
202+
"application/json"
203+
],
200204
"responses": {
201205
"200": {
202206
"description": "Request succeeded. The response contains the list of all active jobs.",
@@ -205,7 +209,10 @@
205209
"jobs": {
206210
"1612a779-f3fa-4344-8819-3d12fa9b9d90": {
207211
"cmd": "date",
208-
"cvmfs_mounts": ["atlas.cern.ch", "atlas-condb.cern.ch"],
212+
"cvmfs_mounts": [
213+
"atlas.cern.ch",
214+
"atlas-condb.cern.ch"
215+
],
209216
"docker_img": "docker.io/library/busybox",
210217
"job_id": "1612a779-f3fa-4344-8819-3d12fa9b9d90",
211218
"max_restart_count": 3,
@@ -214,7 +221,10 @@
214221
},
215222
"2e4bbc1d-db5e-4ee0-9701-6e2b1ba55c20": {
216223
"cmd": "date",
217-
"cvmfs_mounts": ["atlas.cern.ch", "atlas-condb.cern.ch"],
224+
"cvmfs_mounts": [
225+
"atlas.cern.ch",
226+
"atlas-condb.cern.ch"
227+
],
218228
"docker_img": "docker.io/library/busybox",
219229
"job_id": "2e4bbc1d-db5e-4ee0-9701-6e2b1ba55c20",
220230
"max_restart_count": 3,
@@ -235,7 +245,9 @@
235245
"summary": "Returns list of all active jobs."
236246
},
237247
"post": {
238-
"consumes": ["application/json"],
248+
"consumes": [
249+
"application/json"
250+
],
239251
"description": "This resource is expecting JSON data with all the necessary information of a new job.",
240252
"operationId": "create_job",
241253
"parameters": [
@@ -249,7 +261,9 @@
249261
}
250262
}
251263
],
252-
"produces": ["application/json"],
264+
"produces": [
265+
"application/json"
266+
],
253267
"responses": {
254268
"201": {
255269
"description": "Request succeeded. The job has been launched.",
@@ -290,15 +304,20 @@
290304
"type": "string"
291305
}
292306
],
293-
"produces": ["application/json"],
307+
"produces": [
308+
"application/json"
309+
],
294310
"responses": {
295311
"200": {
296312
"description": "Request succeeded. The response contains details about the given job ID.",
297313
"examples": {
298314
"application/json": {
299315
"job": {
300316
"cmd": "date",
301-
"cvmfs_mounts": ["atlas.cern.ch", "atlas-condb.cern.ch"],
317+
"cvmfs_mounts": [
318+
"atlas.cern.ch",
319+
"atlas-condb.cern.ch"
320+
],
302321
"docker_img": "docker.io/library/busybox",
303322
"job_id": "cdcf48b1-c2f3-4693-8230-b066e088c6ac",
304323
"max_restart_count": 3,
@@ -325,7 +344,9 @@
325344
},
326345
"/jobs/{job_id}/": {
327346
"delete": {
328-
"consumes": ["application/json"],
347+
"consumes": [
348+
"application/json"
349+
],
329350
"description": "This resource expects the `job_id` of the job to be deleted.",
330351
"operationId": "delete_job",
331352
"parameters": [
@@ -344,7 +365,9 @@
344365
"type": "string"
345366
}
346367
],
347-
"produces": ["application/json"],
368+
"produces": [
369+
"application/json"
370+
],
348371
"responses": {
349372
"204": {
350373
"description": "Request accepted. A request to delete the job has been sent to the\n compute backend."
@@ -382,7 +405,9 @@
382405
"type": "string"
383406
}
384407
],
385-
"produces": ["application/json"],
408+
"produces": [
409+
"application/json"
410+
],
386411
"responses": {
387412
"200": {
388413
"description": "Request succeeded. The response contains the logs for the given job.",
@@ -406,10 +431,14 @@
406431
},
407432
"/shutdown": {
408433
"delete": {
409-
"consumes": ["application/json"],
434+
"consumes": [
435+
"application/json"
436+
],
410437
"description": "All running jobs will be stopped and no more jobs will be scheduled. Kubernetes will call this endpoint before stopping the pod (PreStop hook).",
411438
"operationId": "shutdown",
412-
"produces": ["application/json"],
439+
"produces": [
440+
"application/json"
441+
],
413442
"responses": {
414443
"200": {
415444
"description": "Request successful. All jobs were stopped.",

0 commit comments

Comments
 (0)