From b621b6b4b70299a60ad3e26ed6b04450f84b603e Mon Sep 17 00:00:00 2001 From: Linda Wang Date: Tue, 12 Sep 2017 07:37:19 +0000 Subject: Add swagger support for Rest API JIRA: FUNCTEST-854 Change-Id: Ic010604d3ba0cc46092cf2a1ae8bb41afa73c920 Signed-off-by: Linda Wang --- functest/api/swagger/task.yaml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 functest/api/swagger/task.yaml (limited to 'functest/api/swagger/task.yaml') diff --git a/functest/api/swagger/task.yaml b/functest/api/swagger/task.yaml new file mode 100644 index 00000000..abf68a0d --- /dev/null +++ b/functest/api/swagger/task.yaml @@ -0,0 +1,38 @@ +Get the result of the specified task + +This api offers the interface to get the result of the specified task. + +--- +tags: + - Tasks +parameters: + - name: task_id + description: task id + in: path + type: string + required: true +definitions: + Task: + type: object + properties: + creds_name: + $ref: '#/definitions/Result' + Result: + type: dict +responses: + 200: + description: Get the result of the specified task + schema: + $ref: '#/definitions/Task' + examples: + "result": { + "case_name": "vping_ssh", + "env_info": { + "build_tag": null, + "ci_loop": "weekly", + "installer": "compass", + "scenario": "os-nosdn-nofeature-noha" }, + "result": "PASS", + "task_id": "1a9f3c5d-ce0b-4354-862e-dd08b26fc484"} + "status": 2 + -- cgit 1.2.3-korg