Delete netconf
[controller.git] / opendaylight / md-sal / sal-rest-docgen / src / test / resources / toaster.json
1 {
2   "apiVersion": "1.0.0",
3   "swaggerVersion": "1.2",
4   "basePath": "/api",
5   "resourcePath": "/toaster",
6   "produces": [
7     "application/json",
8     "application/xml",
9     "text/plain",
10     "text/html"
11   ],
12   "apis": [
13     {
14       "path": "/toaster",
15       "operations": [
16         {
17           "method": "POST",
18           "summary": "Add a new toaster",
19           "notes": "",
20           "type": "void",
21           "nickname": "add toaster",
22           "consumes": [
23             "application/json",
24             "application/xml"
25           ],          
26           "parameters": [
27             {
28               "name": "body",
29               "description": "Pet object that needs to be added to the store",
30               "required": true,
31               "type": "Toaster",
32               "paramType": "body"
33             }
34           ],
35           "responseMessages": [
36             {
37               "code": 405,
38               "message": "Invalid input"
39             }
40           ]
41         }
42       ]
43      },
44     {
45       "path": "/toaster",
46       "operations": [
47         {
48           "method": "GET",
49           "summary": "Add a new toaster",
50           "notes": "",
51           "type": "Toaster",
52           "nickname": "Get toaster",
53           "consumes": [
54             "application/json",
55             "application/xml"
56           ],          
57           "responseMessages": [
58             {
59               "code": 405,
60               "message": "Invalid input"
61             }
62           ]
63         }
64       ]
65      },
66         {
67             "path" : "operations/toaster/cancel-toast",
68             "operations" : [ {
69               "method" : "POST",
70               "summary" : null,
71               "notes" : "Stop making toast, if any is being made.\n           A 'resource-denied' error will be returned \n           if the toaster service is disabled.",
72               "type" : null,
73               "nickname" : "cancel-toast",
74               "consumes" : null,
75               "parameters" : null,
76               "responseMessages" : null
77             } ]
78           }, {
79             "path" : "operations/toaster/make-toast",
80             "operations" : [ {
81               "method" : "POST",
82               "summary" : null,
83               "notes" : "Make some toast.\n           The toastDone notification will be sent when \n           the toast is finished.\n           An 'in-use' error will be returned if toast\n           is already being made.\n           A 'resource-denied' error will be returned \n           if the toaster service is disabled.",
84               "type" : null,
85               "nickname" : "make-toast",
86               "consumes" : null,
87               "parameters" : null,
88               "responseMessages" : null
89             } ]
90           }
91   ],
92   "models": {
93     "Toaster": {
94     "id":"Toaster",
95                 "$schema": "http://json-schema.org/draft-04/schema",
96           "description": "Top-level container for all toaster database objects.",
97           "properties": {
98             "allow-user": {
99               "description": "A list of user name patterns to allow",
100               "items": {"type": "string"},
101               "required": false,
102               "type": "array"
103             },
104                  "how": {
105               "oneOf": [
106                 {
107                   "manual": {"manual": {
108                     "required": false,
109                     "type": "string"
110                   }},
111                   "type": "object"
112                 },
113                 {
114                   "interval": {"interval": {
115                     "required": false,
116                     "type": "integer"
117                   }},
118                   "type": "object"
119                 },
120                 {
121                   "daily": {
122                     "daily": {
123                       "required": false,
124                       "type": "string"
125                     },
126                     "time-of-day": {
127                       "required": false,
128                       "type": "string"
129                     }
130                   },
131                   "type": "object"
132                 }
133               ],
134               "type": "object"
135             },
136             "testToasterBits": {
137               "enum": [
138                 "testbit1",
139                 "testbit2"
140               ],
141               "minItems": 0,
142               "required": false,
143               "type": "String",
144               "uniqueItems": true
145             },
146             "toasterManufacturer": {
147               "description": "The name of the toaster's manufacturer. For instance, \n                Microsoft Toaster.",
148               "required": true,
149               "type": "string"
150             },
151             "toasterModelNumber": {
152               "description": "The name of the toaster's model. For instance,\n               Radiant Automatic.",
153               "required": true,
154               "type": "string"
155             },
156             "toasterStatus": {
157               "description": "This variable indicates the current state of \n               the toaster.",
158               "enum": [
159                 "up",
160                 "down"
161               ],
162               "required": true
163             }
164           }     
165     }
166   }
167 }