Skip to content

Commit

Permalink
cli: add openapi specification for progress in get_workflow_status an…
Browse files Browse the repository at this point in the history
…d missing schema error
  • Loading branch information
BrunoRosendo committed Aug 8, 2022
1 parent 3ab79ec commit 4952c16
Show file tree
Hide file tree
Showing 2 changed files with 139 additions and 1 deletion.
85 changes: 84 additions & 1 deletion docs/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2945,6 +2945,76 @@
"type": "string"
},
"progress": {
"properties": {
"current_command": {
"type": "string"
},
"current_step_name": {
"type": "string"
},
"failed": {
"properties": {
"job_ids": {
"items": {
"type": "string"
},
"type": "array"
},
"total": {
"type": "integer"
}
},
"type": "object"
},
"finished": {
"properties": {
"job_ids": {
"items": {
"type": "string"
},
"type": "array"
},
"total": {
"type": "integer"
}
},
"type": "object"
},
"run_finished_at": {
"type": "string"
},
"run_started_at": {
"type": "string"
},
"running": {
"properties": {
"job_ids": {
"items": {
"type": "string"
},
"type": "array"
},
"total": {
"type": "integer"
}
},
"type": "object"
},
"total": {
"properties": {
"job_ids": {
"items": {
"type": "string"
},
"type": "array"
},
"total": {
"type": "integer"
}
},
"type": "object"
}
},
"type": "object"
},
"status": {
Expand Down Expand Up @@ -3287,7 +3357,20 @@
}
},
"400": {
"description": "Request failed. The incoming payload seems malformed."
"description": "Request failed. The incoming payload seems malformed.",
"examples": {
"application/json": {
"message": "Field 'size': Must be at least 1."
}
},
"schema": {
"properties": {
"message": {
"type": "string"
}
},
"type": "object"
}
},
"403": {
"description": "Request failed. User is not allowed to access workflow.",
Expand Down
55 changes: 55 additions & 0 deletions reana_server/rest/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,51 @@ def get_workflow_status(workflow_id_or_name, user): # noqa
type: string
progress:
type: object
properties:
run_started_at:
type: string
run_finished_at:
type: string
total:
type: object
properties:
total:
type: integer
job_ids:
type: array
items:
type: string
running:
type: object
properties:
total:
type: integer
job_ids:
type: array
items:
type: string
finished:
type: object
properties:
total:
type: integer
job_ids:
type: array
items:
type: string
failed:
type: object
properties:
total:
type: integer
job_ids:
type: array
items:
type: string
current_command:
type: string
current_step_name:
type: string
logs:
type: string
examples:
Expand Down Expand Up @@ -1846,6 +1891,16 @@ def get_files(workflow_id_or_name, user, **kwargs): # noqa
400:
description: >-
Request failed. The incoming payload seems malformed.
schema:
type: object
properties:
message:
type: string
examples:
application/json:
{
"message": "Field 'size': Must be at least 1."
}
403:
description: >-
Request failed. User is not allowed to access workflow.
Expand Down

0 comments on commit 4952c16

Please sign in to comment.