From cc3d0dff586fb9eb472716c088fc1aa68ed95241 Mon Sep 17 00:00:00 2001 From: Diego Rodriguez Date: Wed, 26 Jul 2017 10:00:37 +0200 Subject: [PATCH] wip accept workflow specifications instead of toplevel+workflow_name Signed-off-by: Diego Rodriguez --- docs/openapi.json | 18 ++---------------- reana_workflow_controller/rest.py | 16 ++++------------ 2 files changed, 6 insertions(+), 28 deletions(-) diff --git a/docs/openapi.json b/docs/openapi.json index 264a9fc6..789e2dd3 100644 --- a/docs/openapi.json +++ b/docs/openapi.json @@ -120,25 +120,11 @@ "type": "string" }, { - "description": "Specification with necessary data to instantiate a yadage workflow.", + "description": "Workflow specification with necessary data to instantiate a yadage workflow.", "in": "body", - "name": "yadage_payload", + "name": "workflow", "required": true, "schema": { - "properties": { - "nparallel": { - "type": "integer" - }, - "preset_pars": { - "type": "object" - }, - "toplevel": { - "type": "string" - }, - "workflow": { - "type": "string" - } - }, "type": "object" } } diff --git a/reana_workflow_controller/rest.py b/reana_workflow_controller/rest.py index a72fc288..b0606eaa 100644 --- a/reana_workflow_controller/rest.py +++ b/reana_workflow_controller/rest.py @@ -173,22 +173,13 @@ def yadage_endpoint(): # noqa description: Required. UUID of workflow owner. required: true type: string - - name: yadage_payload + - name: workflow in: body - description: Specification with necessary data to instantiate a - yadage workflow. + description: Workflow specification with necessary data to + instantiate a yadage workflow. required: true schema: type: object - properties: - toplevel: - type: string - workflow: - type: string - nparallel: - type: integer - preset_pars: - type: object responses: 200: description: >- @@ -212,6 +203,7 @@ def yadage_endpoint(): # noqa """ try: if request.json: + # validate request and change parameter names in RWEY queue = organization_to_queue[request.args.get('organization')] resultobject = run_yadage_workflow.apply_async( args=[request.json],