summaryrefslogtreecommitdiffstats
path: root/ice-server/heat_test/swagger/ice_api.yaml
blob: c12269f9a27dea6000b97fcb80ef1fffe8014caf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
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"
      }
    }