f8a2834ebd6b3031cd2e33808835f9163c2b0040
[netconf.git] / restconf / restconf-openapi / src / test / resources / toaster-document / device-all.json
1 {
2   "openapi": "3.0.3",
3   "info": {
4     "version": "1.0.0",
5     "title": "123 modules of RESTCONF",
6     "description": "We are providing full API for configurational data which can be edited (by POST, PUT, PATCH and DELETE).\nFor operational data we only provide GET API.\n\nFor majority of request you can see only config data in examples. That’s because we can show only one example\nper request. The exception when you can see operational data in example is when data are representing\noperational (config false) container with no config data in it."
7   },
8   "servers": [
9     {
10       "url": "http://localhost:8181/"
11     }
12   ],
13   "paths": {
14     "/rests/operations/nodes/node=123/yang-ext:mount/toaster:make-toast": {
15       "post": {
16         "tags": [
17           "123 toaster"
18         ],
19         "parameters": [],
20         "requestBody": {
21           "description": "make-toast_input",
22           "content": {
23             "application/xml": {
24               "schema": {
25                 "$ref": "#/components/schemas/toaster_make-toast_input"
26               }
27             },
28             "application/json": {
29               "schema": {
30                 "properties": {
31                   "input": {
32                     "$ref": "#/components/schemas/toaster_make-toast_input",
33                     "type": "object"
34                   }
35                 }
36               }
37             }
38           }
39         },
40         "responses": {
41           "204": {
42             "description": "RPC make-toast success"
43           }
44         },
45         "description": "Make some toast.\nThe toastDone notification will be sent when\nthe toast is finished.\nAn 'in-use' error will be returned if toast\nis already being made.\nA 'resource-denied' error will be returned\nif the toaster service is disabled.",
46         "summary": "POST - 123 - toaster - make-toast"
47       }
48     },
49     "/rests/operations/nodes/node=123/yang-ext:mount": {
50       "get": {
51         "tags": [
52           "123 GET root"
53         ],
54         "responses": {
55           "200": {
56             "description": "OK"
57           }
58         },
59         "description": "Queries the available operations (RPC calls) on the mounted hosted.",
60         "summary": "GET - 123 - datastore - operations"
61       }
62     },
63     "/rests/data/nodes/node=123/yang-ext:mount/toaster:toaster": {
64       "get": {
65         "tags": [
66           "123 toaster"
67         ],
68         "parameters": [
69           {
70             "name": "content",
71             "in": "query",
72             "required": false,
73             "schema": {
74               "enum": [
75                 "config",
76                 "nonconfig",
77                 "all"
78               ],
79               "type": "string"
80             }
81           }
82         ],
83         "responses": {
84           "200": {
85             "description": "200",
86             "content": {
87               "application/xml": {
88                 "schema": {
89                   "$ref": "#/components/schemas/toaster_toaster"
90                 }
91               },
92               "application/json": {
93                 "schema": {
94                   "properties": {
95                     "toaster": {
96                       "$ref": "#/components/schemas/toaster_toaster",
97                       "type": "object"
98                     }
99                   }
100                 }
101               }
102             }
103           }
104         },
105         "description": "Top-level container for all toaster database objects.",
106         "summary": "GET - 123 - toaster - toaster"
107       },
108       "put": {
109         "tags": [
110           "123 toaster"
111         ],
112         "parameters": [],
113         "requestBody": {
114           "description": "toaster",
115           "content": {
116             "application/xml": {
117               "schema": {
118                 "$ref": "#/components/schemas/toaster_toaster"
119               }
120             },
121             "application/json": {
122               "schema": {
123                 "properties": {
124                   "toaster:toaster": {
125                     "$ref": "#/components/schemas/toaster_toaster",
126                     "type": "object"
127                   }
128                 }
129               }
130             }
131           }
132         },
133         "responses": {
134           "201": {
135             "description": "Created"
136           },
137           "204": {
138             "description": "Updated"
139           }
140         },
141         "description": "Top-level container for all toaster database objects.",
142         "summary": "PUT - toaster - 123 - toaster"
143       },
144       "delete": {
145         "tags": [
146           "123 toaster"
147         ],
148         "parameters": [],
149         "responses": {
150           "204": {
151             "description": "Deleted"
152           }
153         },
154         "description": "Top-level container for all toaster database objects.",
155         "summary": "DELETE - 123 - toaster - toaster"
156       },
157       "patch": {
158         "tags": [
159           "123 toaster"
160         ],
161         "parameters": [],
162         "requestBody": {
163           "description": "toaster",
164           "content": {
165             "application/yang-data+json": {
166               "schema": {
167                 "properties": {
168                   "toaster:toaster": {
169                     "$ref": "#/components/schemas/toaster_toaster",
170                     "type": "object"
171                   }
172                 }
173               }
174             },
175             "application/yang-data+xml": {
176               "schema": {
177                 "$ref": "#/components/schemas/toaster_toaster"
178               }
179             }
180           }
181         },
182         "responses": {
183           "204": {
184             "description": "Updated"
185           },
186           "200": {
187             "description": "OK"
188           }
189         },
190         "description": "Top-level container for all toaster database objects.",
191         "summary": "PATCH - toaster - 123 - toaster"
192       }
193     },
194     "/rests/operations/nodes/node=123/yang-ext:mount/toaster:restock-toaster": {
195       "post": {
196         "tags": [
197           "123 toaster"
198         ],
199         "parameters": [],
200         "requestBody": {
201           "description": "restock-toaster_input",
202           "content": {
203             "application/xml": {
204               "schema": {
205                 "$ref": "#/components/schemas/toaster_restock-toaster_input"
206               }
207             },
208             "application/json": {
209               "schema": {
210                 "properties": {
211                   "input": {
212                     "$ref": "#/components/schemas/toaster_restock-toaster_input",
213                     "type": "object"
214                   }
215                 }
216               }
217             }
218           }
219         },
220         "responses": {
221           "204": {
222             "description": "RPC restock-toaster success"
223           }
224         },
225         "description": "Restocks the toaster with the amount of bread specified.",
226         "summary": "POST - 123 - toaster - restock-toaster"
227       }
228     },
229     "/rests/data/nodes/node=123/yang-ext:mount": {
230       "get": {
231         "tags": [
232           "123 GET root"
233         ],
234         "responses": {
235           "200": {
236             "description": "OK"
237           }
238         },
239         "description": "Queries the config (startup) datastore on the mounted hosted.",
240         "summary": "GET - 123 - datastore - data"
241       }
242     },
243     "/rests/operations/nodes/node=123/yang-ext:mount/toaster:cancel-toast": {
244       "post": {
245         "tags": [
246           "123 toaster"
247         ],
248         "parameters": [],
249         "requestBody": {
250           "description": "cancel-toast_input",
251           "content": {
252             "application/xml": {
253               "schema": {
254                 "xml": {
255                   "name": "input",
256                   "namespace": "http://netconfcentral.org/ns/toaster"
257                 },
258                 "type": "object"
259               }
260             },
261             "application/json": {
262               "schema": {
263                 "properties": {
264                   "input": {
265                     "type": "object"
266                   }
267                 },
268                 "type": "object"
269               }
270             }
271           }
272         },
273         "responses": {
274           "204": {
275             "description": "RPC cancel-toast success"
276           }
277         },
278         "description": "Stop making toast, if any is being made.\nA 'resource-denied' error will be returned\nif the toaster service is disabled.",
279         "summary": "POST - 123 - toaster - cancel-toast"
280       }
281     }
282   },
283   "components": {
284     "schemas": {
285       "toaster_restock-toaster_input": {
286         "properties": {
287           "amountOfBreadToStock": {
288             "description": "Indicates the amount of bread to re-stock",
289             "type": "integer",
290             "example": 0,
291             "format": "int64"
292           }
293         },
294         "xml": {
295           "name": "input",
296           "namespace": "http://netconfcentral.org/ns/toaster"
297         },
298         "title": "toaster_restock-toaster_input",
299         "type": "object"
300       },
301       "toaster_make-toast_input": {
302         "properties": {
303           "toasterToastType": {
304             "default": "wheat-bread",
305             "description": "This variable informs the toaster of the type of\nmaterial that is being toasted. The toaster\nuses this information, combined with\ntoasterDoneness, to compute for how\nlong the material must be toasted to achieve\nthe required doneness.",
306             "type": "string",
307             "example": "toast-type",
308             "enum": [
309               "toast-type",
310               "frozen-bagel",
311               "hash-brown",
312               "wonder-bread",
313               "frozen-waffle",
314               "white-bread",
315               "wheat-bread"
316             ]
317           },
318           "toasterDoneness": {
319             "default": 5,
320             "description": "This variable controls how well-done is the\nensuing toast. It should be on a scale of 1 to 10.\nToast made at 10 generally is considered unfit\nfor human consumption; toast made at 1 is warmed\nlightly.",
321             "type": "integer",
322             "example": 1,
323             "format": "int64"
324           }
325         },
326         "xml": {
327           "name": "input",
328           "namespace": "http://netconfcentral.org/ns/toaster"
329         },
330         "title": "toaster_make-toast_input",
331         "type": "object"
332       },
333       "toaster_toaster": {
334         "properties": {
335           "darknessFactor": {
336             "default": 1000,
337             "description": "The darkness factor. Basically, the number of ms to multiple the doneness value by.",
338             "type": "integer",
339             "example": 0,
340             "format": "int64"
341           }
342         },
343         "xml": {
344           "name": "toaster",
345           "namespace": "http://netconfcentral.org/ns/toaster"
346         },
347         "description": "Top-level container for all toaster database objects.",
348         "title": "toaster_toaster",
349         "type": "object"
350       }
351     },
352     "securitySchemes": {
353       "basicAuth": {
354         "scheme": "basic",
355         "type": "http"
356       }
357     }
358   },
359   "security": [
360     {
361       "basicAuth": []
362     }
363   ]
364 }