Adapt tests for OpenApi
[netconf.git] / restconf / restconf-openapi / src / test / resources / operational-document / device-operational.json
1 {
2   "openapi": "3.0.3",
3   "info": {
4     "version": "1.0.0",
5     "title": "operational",
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 is 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/data/nodes/node=123/yang-ext:mount/operational:root": {
15       "get": {
16         "tags": [
17           "123 operational"
18         ],
19         "parameters": [
20           {
21             "name": "content",
22             "in": "query",
23             "required": false,
24             "schema": {
25               "enum": [
26                 "config",
27                 "nonconfig",
28                 "all"
29               ],
30               "type": "string"
31             }
32           }
33         ],
34         "responses": {
35           "200": {
36             "description": "200",
37             "content": {
38               "application/xml": {
39                 "schema": {
40                   "$ref": "#/components/schemas/operational_root"
41                 }
42               },
43               "application/json": {
44                 "schema": {
45                   "properties": {
46                     "root": {
47                       "$ref": "#/components/schemas/operational_root",
48                       "type": "object"
49                     }
50                   }
51                 }
52               }
53             }
54           }
55         },
56         "description": "",
57         "summary": "GET - 123 - operational - root"
58       },
59       "put": {
60         "tags": [
61           "123 operational"
62         ],
63         "parameters": [],
64         "requestBody": {
65           "description": "root",
66           "content": {
67             "application/xml": {
68               "schema": {
69                 "$ref": "#/components/schemas/operational_root"
70               }
71             },
72             "application/json": {
73               "schema": {
74                 "properties": {
75                   "operational:root": {
76                     "$ref": "#/components/schemas/operational_root",
77                     "type": "object"
78                   }
79                 }
80               }
81             }
82           }
83         },
84         "responses": {
85           "201": {
86             "description": "Created"
87           },
88           "204": {
89             "description": "Updated"
90           }
91         },
92         "description": "",
93         "summary": "PUT - operational - 123 - root"
94       },
95       "post": {
96         "tags": [
97           "123 operational"
98         ],
99         "parameters": [],
100         "requestBody": {
101           "description": "root",
102           "content": {
103             "application/xml": {
104               "schema": {
105                 "$ref": "#/components/schemas/operational_root"
106               }
107             },
108             "application/json": {
109               "schema": {
110                 "$ref": "#/components/schemas/operational_root"
111               }
112             }
113           }
114         },
115         "responses": {
116           "201": {
117             "description": "Created"
118           }
119         },
120         "description": "\n\nNote:\nIn example payload, you can see only the first data node child of the resource to be created, following the\nguidelines of RFC 8040, which allows us to create only one resource in POST request.\n",
121         "summary": "POST - 123 - operational - root"
122       },
123       "delete": {
124         "tags": [
125           "123 operational"
126         ],
127         "parameters": [],
128         "responses": {
129           "204": {
130             "description": "Deleted"
131           }
132         },
133         "description": "",
134         "summary": "DELETE - 123 - operational - root"
135       },
136       "patch": {
137         "tags": [
138           "123 operational"
139         ],
140         "parameters": [],
141         "requestBody": {
142           "description": "root",
143           "content": {
144             "application/yang-data+json": {
145               "schema": {
146                 "properties": {
147                   "operational:root": {
148                     "$ref": "#/components/schemas/operational_root",
149                     "type": "object"
150                   }
151                 }
152               }
153             },
154             "application/yang-data+xml": {
155               "schema": {
156                 "$ref": "#/components/schemas/operational_root"
157               }
158             }
159           }
160         },
161         "responses": {
162           "204": {
163             "description": "Updated"
164           },
165           "200": {
166             "description": "OK"
167           }
168         },
169         "description": "",
170         "summary": "PATCH - operational - 123 - root"
171       }
172     },
173     "/rests/data/nodes/node=123/yang-ext:mount/operational:root/oper-container/config-container": {
174       "get": {
175         "tags": [
176           "123 operational"
177         ],
178         "parameters": [
179           {
180             "name": "content",
181             "in": "query",
182             "required": true,
183             "schema": {
184               "enum": [
185                 "config",
186                 "nonconfig",
187                 "all"
188               ],
189               "type": "string"
190             }
191           }
192         ],
193         "responses": {
194           "200": {
195             "description": "200",
196             "content": {
197               "application/xml": {
198                 "schema": {
199                   "$ref": "#/components/schemas/operational_root_oper-container_config-container"
200                 }
201               },
202               "application/json": {
203                 "schema": {
204                   "properties": {
205                     "config-container": {
206                       "$ref": "#/components/schemas/operational_root_oper-container_config-container",
207                       "type": "object"
208                     }
209                   }
210                 }
211               }
212             }
213           }
214         },
215         "description": "",
216         "summary": "GET - 123 - operational - config-container"
217       }
218     },
219     "/rests/data/nodes/node=123/yang-ext:mount/operational:root/oper-container": {
220       "get": {
221         "tags": [
222           "123 operational"
223         ],
224         "parameters": [
225           {
226             "name": "content",
227             "in": "query",
228             "required": true,
229             "schema": {
230               "enum": [
231                 "config",
232                 "nonconfig",
233                 "all"
234               ],
235               "type": "string"
236             }
237           }
238         ],
239         "responses": {
240           "200": {
241             "description": "200",
242             "content": {
243               "application/xml": {
244                 "schema": {
245                   "$ref": "#/components/schemas/operational_root_oper-container"
246                 }
247               },
248               "application/json": {
249                 "schema": {
250                   "properties": {
251                     "oper-container": {
252                       "$ref": "#/components/schemas/operational_root_oper-container",
253                       "type": "object"
254                     }
255                   }
256                 }
257               }
258             }
259           }
260         },
261         "description": "",
262         "summary": "GET - 123 - operational - oper-container"
263       }
264     },
265     "/rests/data/nodes/node=123/yang-ext:mount/operational:root/oper-container/oper-container-list={oper-container-list-leaf}": {
266       "get": {
267         "tags": [
268           "123 operational"
269         ],
270         "parameters": [
271           {
272             "name": "oper-container-list-leaf",
273             "in": "path",
274             "required": true,
275             "schema": {
276               "type": "string"
277             }
278           },
279           {
280             "name": "content",
281             "in": "query",
282             "required": true,
283             "schema": {
284               "enum": [
285                 "config",
286                 "nonconfig",
287                 "all"
288               ],
289               "type": "string"
290             }
291           }
292         ],
293         "responses": {
294           "200": {
295             "description": "200",
296             "content": {
297               "application/xml": {
298                 "schema": {
299                   "$ref": "#/components/schemas/operational_root_oper-container_oper-container-list"
300                 }
301               },
302               "application/json": {
303                 "schema": {
304                   "properties": {
305                     "oper-container-list": {
306                       "type": "array",
307                       "items": {
308                         "$ref": "#/components/schemas/operational_root_oper-container_oper-container-list",
309                         "type": "object"
310                       }
311                     }
312                   }
313                 }
314               }
315             }
316           }
317         },
318         "description": "",
319         "summary": "GET - 123 - operational - oper-container-list"
320       }
321     },
322     "/rests/data/nodes/node=123/yang-ext:mount/operational:root/config-container/config-container-oper-list={oper-container-list-leaf}": {
323       "get": {
324         "tags": [
325           "123 operational"
326         ],
327         "parameters": [
328           {
329             "name": "oper-container-list-leaf",
330             "in": "path",
331             "required": true,
332             "schema": {
333               "type": "string"
334             }
335           },
336           {
337             "name": "content",
338             "in": "query",
339             "required": true,
340             "schema": {
341               "enum": [
342                 "config",
343                 "nonconfig",
344                 "all"
345               ],
346               "type": "string"
347             }
348           }
349         ],
350         "responses": {
351           "200": {
352             "description": "200",
353             "content": {
354               "application/xml": {
355                 "schema": {
356                   "$ref": "#/components/schemas/operational_root_config-container_config-container-oper-list"
357                 }
358               },
359               "application/json": {
360                 "schema": {
361                   "properties": {
362                     "config-container-oper-list": {
363                       "type": "array",
364                       "items": {
365                         "$ref": "#/components/schemas/operational_root_config-container_config-container-oper-list",
366                         "type": "object"
367                       }
368                     }
369                   }
370                 }
371               }
372             }
373           }
374         },
375         "description": "",
376         "summary": "GET - 123 - operational - config-container-oper-list"
377       }
378     },
379     "/rests/data/nodes/node=123/yang-ext:mount/operational:root/config-container": {
380       "get": {
381         "tags": [
382           "123 operational"
383         ],
384         "parameters": [
385           {
386             "name": "content",
387             "in": "query",
388             "required": false,
389             "schema": {
390               "enum": [
391                 "config",
392                 "nonconfig",
393                 "all"
394               ],
395               "type": "string"
396             }
397           }
398         ],
399         "responses": {
400           "200": {
401             "description": "200",
402             "content": {
403               "application/xml": {
404                 "schema": {
405                   "$ref": "#/components/schemas/operational_root_config-container"
406                 }
407               },
408               "application/json": {
409                 "schema": {
410                   "properties": {
411                     "config-container": {
412                       "$ref": "#/components/schemas/operational_root_config-container",
413                       "type": "object"
414                     }
415                   }
416                 }
417               }
418             }
419           }
420         },
421         "description": "",
422         "summary": "GET - 123 - operational - config-container"
423       },
424       "put": {
425         "tags": [
426           "123 operational"
427         ],
428         "parameters": [],
429         "requestBody": {
430           "description": "config-container",
431           "content": {
432             "application/xml": {
433               "schema": {
434                 "$ref": "#/components/schemas/operational_root_config-container"
435               }
436             },
437             "application/json": {
438               "schema": {
439                 "properties": {
440                   "operational:config-container": {
441                     "$ref": "#/components/schemas/operational_root_config-container",
442                     "type": "object"
443                   }
444                 }
445               }
446             }
447           }
448         },
449         "responses": {
450           "201": {
451             "description": "Created"
452           },
453           "204": {
454             "description": "Updated"
455           }
456         },
457         "description": "",
458         "summary": "PUT - operational - 123 - config-container"
459       },
460       "post": {
461         "tags": [
462           "123 operational"
463         ],
464         "parameters": [],
465         "requestBody": {
466           "description": "config-container",
467           "content": {
468             "application/xml": {
469               "schema": {
470                 "$ref": "#/components/schemas/operational_root_config-container"
471               }
472             },
473             "application/json": {
474               "schema": {
475                 "$ref": "#/components/schemas/operational_root_config-container"
476               }
477             }
478           }
479         },
480         "responses": {
481           "201": {
482             "description": "Created"
483           }
484         },
485         "description": "\n\nNote:\nIn example payload, you can see only the first data node child of the resource to be created, following the\nguidelines of RFC 8040, which allows us to create only one resource in POST request.\n",
486         "summary": "POST - 123 - operational - config-container"
487       },
488       "delete": {
489         "tags": [
490           "123 operational"
491         ],
492         "parameters": [],
493         "responses": {
494           "204": {
495             "description": "Deleted"
496           }
497         },
498         "description": "",
499         "summary": "DELETE - 123 - operational - config-container"
500       },
501       "patch": {
502         "tags": [
503           "123 operational"
504         ],
505         "parameters": [],
506         "requestBody": {
507           "description": "config-container",
508           "content": {
509             "application/yang-data+json": {
510               "schema": {
511                 "properties": {
512                   "operational:config-container": {
513                     "$ref": "#/components/schemas/operational_root_config-container",
514                     "type": "object"
515                   }
516                 }
517               }
518             },
519             "application/yang-data+xml": {
520               "schema": {
521                 "$ref": "#/components/schemas/operational_root_config-container"
522               }
523             }
524           }
525         },
526         "responses": {
527           "204": {
528             "description": "Updated"
529           },
530           "200": {
531             "description": "OK"
532           }
533         },
534         "description": "",
535         "summary": "PATCH - operational - 123 - config-container"
536       }
537     },
538     "/rests/data/nodes/node=123/yang-ext:mount": {
539       "post": {
540         "tags": [
541           "123 operational"
542         ],
543         "parameters": [],
544         "requestBody": {
545           "description": "root",
546           "content": {
547             "application/xml": {
548               "schema": {
549                 "$ref": "#/components/schemas/operational_root"
550               }
551             },
552             "application/json": {
553               "schema": {
554                 "properties": {
555                   "root": {
556                     "$ref": "#/components/schemas/operational_root",
557                     "type": "object"
558                   }
559                 }
560               }
561             }
562           }
563         },
564         "responses": {
565           "201": {
566             "description": "Created"
567           }
568         },
569         "description": "\n\nNote:\nIn example payload, you can see only the first data node child of the resource to be created, following the\nguidelines of RFC 8040, which allows us to create only one resource in POST request.\n",
570         "summary": "POST - 123 - operational - operational"
571       }
572     }
573   },
574   "components": {
575     "schemas": {
576       "operational_root_config-container": {
577         "properties": {
578           "config-container-config-leaf": {
579             "description": "",
580             "type": "string",
581             "example": "Some config-container-config-leaf"
582           },
583           "leaf-second-case": {
584             "description": "",
585             "type": "string",
586             "example": "Some leaf-second-case"
587           }
588         },
589         "xml": {
590           "name": "config-container",
591           "namespace": "urn:opendaylight:oper"
592         },
593         "description": "",
594         "title": "operational_root_config-container",
595         "type": "object"
596       },
597       "operational_root": {
598         "properties": {
599           "leaf-config": {
600             "description": "",
601             "type": "string",
602             "example": "Some leaf-config"
603           },
604           "config-container": {
605             "$ref": "#/components/schemas/operational_root_config-container"
606           }
607         },
608         "xml": {
609           "name": "root",
610           "namespace": "urn:opendaylight:oper"
611         },
612         "description": "",
613         "title": "operational_root",
614         "type": "object"
615       },
616       "operational_root_oper-container_oper-container-list": {
617         "properties": {
618           "oper-container-list-leaf": {
619             "description": "",
620             "type": "string",
621             "example": "Some oper-container-list-leaf"
622           }
623         },
624         "xml": {
625           "name": "oper-container-list",
626           "namespace": "urn:opendaylight:oper"
627         },
628         "description": "",
629         "title": "operational_root_oper-container_oper-container-list",
630         "type": "object"
631       },
632       "operational_root_oper-container_config-container": {
633         "required": [
634           "config-container-config-leaf"
635         ],
636         "properties": {
637           "opconfig-container-oper-leaf": {
638             "description": "",
639             "type": "string",
640             "example": "Some opconfig-container-oper-leaf"
641           },
642           "config-container-config-leaf": {
643             "description": "",
644             "type": "string",
645             "example": "Some config-container-config-leaf"
646           }
647         },
648         "xml": {
649           "name": "config-container",
650           "namespace": "urn:opendaylight:oper"
651         },
652         "description": "",
653         "title": "operational_root_oper-container_config-container",
654         "type": "object"
655       },
656       "operational_root_oper-container": {
657         "required": [
658           "config-container"
659         ],
660         "properties": {
661           "config-container": {
662             "$ref": "#/components/schemas/operational_root_oper-container_config-container"
663           },
664           "oper-container-config-leaf-list": {
665             "description": "",
666             "type": "array",
667             "items": {
668               "type": "string",
669               "example": "Some oper-container-config-leaf-list"
670             }
671           },
672           "oper-container-list": {
673             "description": "",
674             "type": "array",
675             "items": {
676               "$ref": "#/components/schemas/operational_root_oper-container_oper-container-list"
677             }
678           },
679           "leaf-first-case": {
680             "description": "",
681             "type": "string",
682             "example": "Some leaf-first-case"
683           },
684           "oper-leaf-first-case": {
685             "description": "",
686             "type": "string",
687             "example": "Some oper-leaf-first-case"
688           }
689         },
690         "xml": {
691           "name": "oper-container",
692           "namespace": "urn:opendaylight:oper"
693         },
694         "description": "",
695         "title": "operational_root_oper-container",
696         "type": "object"
697       },
698       "operational_root_config-container_config-container-oper-list": {
699         "properties": {
700           "oper-container-list-leaf": {
701             "description": "",
702             "type": "string",
703             "example": "Some oper-container-list-leaf"
704           }
705         },
706         "xml": {
707           "name": "config-container-oper-list",
708           "namespace": "urn:opendaylight:oper"
709         },
710         "description": "",
711         "title": "operational_root_config-container_config-container-oper-list",
712         "type": "object"
713       }
714     },
715     "securitySchemes": {
716       "basicAuth": {
717         "scheme": "basic",
718         "type": "http"
719       }
720     }
721   },
722   "security": [
723     {
724       "basicAuth": []
725     }
726   ]
727 }