From b2727af1d234bae3e64cf31a0af3dfee2d1c91f8 Mon Sep 17 00:00:00 2001 From: Mickael JEZEQUEL Date: Wed, 7 Mar 2018 17:19:48 +0100 Subject: implement rest API for ICE tests Change-Id: I1ccb630858907161c4e8b13986fe963bb309b608 Issue-ID: VNFSDK-213 Signed-off-by: Mickael JEZEQUEL --- ice-server/heat_test/swagger/ice_api.yaml | 85 +++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 ice-server/heat_test/swagger/ice_api.yaml (limited to 'ice-server/heat_test/swagger/ice_api.yaml') diff --git a/ice-server/heat_test/swagger/ice_api.yaml b/ice-server/heat_test/swagger/ice_api.yaml new file mode 100644 index 0000000..c12269f --- /dev/null +++ b/ice-server/heat_test/swagger/ice_api.yaml @@ -0,0 +1,85 @@ +swagger: "2.0" + +info: + title: "ICE validation" + description: "Heat template validation rest API" + contact: + name: ONAP + url: https://www.onap.org + email: onap-discuss@lists.onap.org + license: + name: Apache 2.0 + url: http://www.apache.org/licenses/LICENSE-2.0.html + version: "1.0.0" + +basePath: /onapapi/ice/v1 + +paths: + /: + get: + summary: "list HEAT templates" + operationId: heat_validator.class_instance.ping + responses: + '200': + description: 'server is up and running' + schema: + type: string + post: + summary: "validate HEAT template" + operationId: heat_validator.class_instance.validate + consumes: [ + "multipart/form-data" + ] + produces: [ + "application/json" + ] + parameters: [ + { + "name": "file", + "in": "formData", + "description": "file to upload", + "required": true, + "type": "file" + }, + { + "name": "debug", + "in": "query", + "description": "debug mode", + "required": false, + "type": "boolean" + } + ] + responses: + "200": + description: 'validation success' + schema: { + "$ref": "#/definitions/Result" + } + "400": + description: 'validation error' + schema: { + "$ref": "#/definitions/Result" + } + "500": + description: 'validation error' + schema: { + "$ref": "#/definitions/Result" + } +definitions: + Result: + required: [ + "status", + "message" + ] + properties: { + "status": { + "type": "integer", + "format": "int64" + }, + "message": { + "type": "string" + }, + "debug": { + "type": "string" + } + } \ No newline at end of file -- cgit 1.2.3-korg