cc34adf04ab99faaeb9927a1bf873a817e516a0d
[netconf.git] / restconf / restconf-openapi / src / test / resources / yang-document / controller-action-types.json
1 {
2   "openapi": "3.0.3",
3   "info": {
4     "version": "1.0.0",
5     "title": "action-types",
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/data/action-types:multi-container/inner-container": {
15       "get": {
16         "tags": [
17           "Controller action-types"
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/action-types_multi-container_inner-container"
41                 }
42               },
43               "application/json": {
44                 "schema": {
45                   "properties": {
46                     "inner-container": {
47                       "$ref": "#/components/schemas/action-types_multi-container_inner-container",
48                       "type": "object"
49                     }
50                   }
51                 }
52               }
53             }
54           }
55         },
56         "description": "",
57         "summary": "GET - Controller - action-types - inner-container"
58       },
59       "put": {
60         "tags": [
61           "Controller action-types"
62         ],
63         "parameters": [],
64         "requestBody": {
65           "description": "inner-container",
66           "content": {
67             "application/xml": {
68               "schema": {
69                 "$ref": "#/components/schemas/action-types_multi-container_inner-container"
70               }
71             },
72             "application/json": {
73               "schema": {
74                 "properties": {
75                   "action-types:inner-container": {
76                     "$ref": "#/components/schemas/action-types_multi-container_inner-container",
77                     "type": "object"
78                   }
79                 }
80               }
81             }
82           }
83         },
84         "responses": {
85           "204": {
86             "description": "Updated"
87           },
88           "201": {
89             "description": "Created"
90           }
91         },
92         "description": "",
93         "summary": "PUT - action-types - Controller - inner-container"
94       },
95       "delete": {
96         "tags": [
97           "Controller action-types"
98         ],
99         "parameters": [],
100         "responses": {
101           "204": {
102             "description": "Deleted"
103           }
104         },
105         "description": "",
106         "summary": "DELETE - Controller - action-types - inner-container"
107       },
108       "patch": {
109         "tags": [
110           "Controller action-types"
111         ],
112         "parameters": [],
113         "requestBody": {
114           "description": "inner-container",
115           "content": {
116             "application/yang-data+json": {
117               "schema": {
118                 "properties": {
119                   "action-types:inner-container": {
120                     "$ref": "#/components/schemas/action-types_multi-container_inner-container",
121                     "type": "object"
122                   }
123                 }
124               }
125             },
126             "application/yang-data+xml": {
127               "schema": {
128                 "$ref": "#/components/schemas/action-types_multi-container_inner-container"
129               }
130             }
131           }
132         },
133         "responses": {
134           "200": {
135             "description": "OK"
136           },
137           "204": {
138             "description": "Updated"
139           }
140         },
141         "description": "",
142         "summary": "PATCH - action-types - Controller - inner-container"
143       }
144     },
145     "/rests/operations/action-types:container/container-action": {
146       "post": {
147         "tags": [
148           "Controller action-types"
149         ],
150         "parameters": [],
151         "requestBody": {
152           "description": "container-action_input",
153           "content": {
154             "application/xml": {
155               "schema": {
156                 "$ref": "#/components/schemas/action-types_container_container-action_input"
157               }
158             },
159             "application/json": {
160               "schema": {
161                 "properties": {
162                   "input": {
163                     "$ref": "#/components/schemas/action-types_container_container-action_input",
164                     "type": "object"
165                   }
166                 }
167               }
168             }
169           }
170         },
171         "responses": {
172           "200": {
173             "description": "RPC container-action success",
174             "content": {
175               "application/xml": {
176                 "schema": {
177                   "$ref": "#/components/schemas/action-types_container_container-action_output"
178                 }
179               },
180               "application/json": {
181                 "schema": {
182                   "$ref": "#/components/schemas/action-types_container_container-action_output"
183                 }
184               }
185             }
186           }
187         },
188         "description": "",
189         "summary": "POST - Controller - action-types - container-action"
190       }
191     },
192     "/rests/data": {
193       "post": {
194         "tags": [
195           "Controller action-types"
196         ],
197         "parameters": [],
198         "requestBody": {
199           "description": "list",
200           "content": {
201             "application/xml": {
202               "schema": {
203                 "$ref": "#/components/schemas/action-types_list"
204               }
205             },
206             "application/json": {
207               "schema": {
208                 "properties": {
209                   "list": {
210                     "type": "array",
211                     "items": {
212                       "$ref": "#/components/schemas/action-types_list",
213                       "type": "object"
214                     }
215                   }
216                 }
217               }
218             }
219           }
220         },
221         "responses": {
222           "201": {
223             "description": "Created"
224           }
225         },
226         "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",
227         "summary": "POST - Controller - action-types - action-types"
228       }
229     },
230     "/rests/data/action-types:multi-container": {
231       "get": {
232         "tags": [
233           "Controller action-types"
234         ],
235         "parameters": [
236           {
237             "name": "content",
238             "in": "query",
239             "required": false,
240             "schema": {
241               "enum": [
242                 "config",
243                 "nonconfig",
244                 "all"
245               ],
246               "type": "string"
247             }
248           }
249         ],
250         "responses": {
251           "200": {
252             "description": "200",
253             "content": {
254               "application/xml": {
255                 "schema": {
256                   "$ref": "#/components/schemas/action-types_multi-container"
257                 }
258               },
259               "application/json": {
260                 "schema": {
261                   "properties": {
262                     "multi-container": {
263                       "$ref": "#/components/schemas/action-types_multi-container",
264                       "type": "object"
265                     }
266                   }
267                 }
268               }
269             }
270           }
271         },
272         "description": "",
273         "summary": "GET - Controller - action-types - multi-container"
274       },
275       "put": {
276         "tags": [
277           "Controller action-types"
278         ],
279         "parameters": [],
280         "requestBody": {
281           "description": "multi-container",
282           "content": {
283             "application/xml": {
284               "schema": {
285                 "$ref": "#/components/schemas/action-types_multi-container"
286               }
287             },
288             "application/json": {
289               "schema": {
290                 "properties": {
291                   "action-types:multi-container": {
292                     "$ref": "#/components/schemas/action-types_multi-container",
293                     "type": "object"
294                   }
295                 }
296               }
297             }
298           }
299         },
300         "responses": {
301           "204": {
302             "description": "Updated"
303           },
304           "201": {
305             "description": "Created"
306           }
307         },
308         "description": "",
309         "summary": "PUT - action-types - Controller - multi-container"
310       },
311       "post": {
312         "tags": [
313           "Controller action-types"
314         ],
315         "parameters": [],
316         "requestBody": {
317           "description": "inner-container",
318           "content": {
319             "application/xml": {
320               "schema": {
321                 "$ref": "#/components/schemas/action-types_multi-container_inner-container"
322               }
323             },
324             "application/json": {
325               "schema": {
326                 "properties": {
327                   "inner-container": {
328                     "$ref": "#/components/schemas/action-types_multi-container_inner-container",
329                     "type": "object"
330                   }
331                 }
332               }
333             }
334           }
335         },
336         "responses": {
337           "201": {
338             "description": "Created"
339           }
340         },
341         "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",
342         "summary": "POST - Controller - action-types - multi-container"
343       },
344       "delete": {
345         "tags": [
346           "Controller action-types"
347         ],
348         "parameters": [],
349         "responses": {
350           "204": {
351             "description": "Deleted"
352           }
353         },
354         "description": "",
355         "summary": "DELETE - Controller - action-types - multi-container"
356       },
357       "patch": {
358         "tags": [
359           "Controller action-types"
360         ],
361         "parameters": [],
362         "requestBody": {
363           "description": "multi-container",
364           "content": {
365             "application/yang-data+json": {
366               "schema": {
367                 "properties": {
368                   "action-types:multi-container": {
369                     "$ref": "#/components/schemas/action-types_multi-container",
370                     "type": "object"
371                   }
372                 }
373               }
374             },
375             "application/yang-data+xml": {
376               "schema": {
377                 "$ref": "#/components/schemas/action-types_multi-container"
378               }
379             }
380           }
381         },
382         "responses": {
383           "200": {
384             "description": "OK"
385           },
386           "204": {
387             "description": "Updated"
388           }
389         },
390         "description": "",
391         "summary": "PATCH - action-types - Controller - multi-container"
392       }
393     },
394     "/rests/data/action-types:list={name}": {
395       "get": {
396         "tags": [
397           "Controller action-types"
398         ],
399         "parameters": [
400           {
401             "name": "name",
402             "in": "path",
403             "required": true,
404             "schema": {
405               "type": "string"
406             }
407           },
408           {
409             "name": "content",
410             "in": "query",
411             "required": false,
412             "schema": {
413               "enum": [
414                 "config",
415                 "nonconfig",
416                 "all"
417               ],
418               "type": "string"
419             }
420           }
421         ],
422         "responses": {
423           "200": {
424             "description": "200",
425             "content": {
426               "application/xml": {
427                 "schema": {
428                   "$ref": "#/components/schemas/action-types_list"
429                 }
430               },
431               "application/json": {
432                 "schema": {
433                   "properties": {
434                     "list": {
435                       "type": "array",
436                       "items": {
437                         "$ref": "#/components/schemas/action-types_list",
438                         "type": "object"
439                       }
440                     }
441                   }
442                 }
443               }
444             }
445           }
446         },
447         "description": "",
448         "summary": "GET - Controller - action-types - list"
449       },
450       "put": {
451         "tags": [
452           "Controller action-types"
453         ],
454         "parameters": [
455           {
456             "name": "name",
457             "in": "path",
458             "required": true,
459             "schema": {
460               "type": "string"
461             }
462           }
463         ],
464         "requestBody": {
465           "description": "list",
466           "content": {
467             "application/xml": {
468               "schema": {
469                 "$ref": "#/components/schemas/action-types_list"
470               }
471             },
472             "application/json": {
473               "schema": {
474                 "properties": {
475                   "action-types:list": {
476                     "type": "array",
477                     "items": {
478                       "$ref": "#/components/schemas/action-types_list",
479                       "type": "object"
480                     }
481                   }
482                 }
483               }
484             }
485           }
486         },
487         "responses": {
488           "204": {
489             "description": "Updated"
490           },
491           "201": {
492             "description": "Created"
493           }
494         },
495         "description": "",
496         "summary": "PUT - action-types - Controller - list"
497       },
498       "delete": {
499         "tags": [
500           "Controller action-types"
501         ],
502         "parameters": [
503           {
504             "name": "name",
505             "in": "path",
506             "required": true,
507             "schema": {
508               "type": "string"
509             }
510           }
511         ],
512         "responses": {
513           "204": {
514             "description": "Deleted"
515           }
516         },
517         "description": "",
518         "summary": "DELETE - Controller - action-types - list"
519       },
520       "patch": {
521         "tags": [
522           "Controller action-types"
523         ],
524         "parameters": [
525           {
526             "name": "name",
527             "in": "path",
528             "required": true,
529             "schema": {
530               "type": "string"
531             }
532           }
533         ],
534         "requestBody": {
535           "description": "list",
536           "content": {
537             "application/yang-data+json": {
538               "schema": {
539                 "properties": {
540                   "action-types:list": {
541                     "type": "array",
542                     "items": {
543                       "$ref": "#/components/schemas/action-types_list",
544                       "type": "object"
545                     }
546                   }
547                 }
548               }
549             },
550             "application/yang-data+xml": {
551               "schema": {
552                 "$ref": "#/components/schemas/action-types_list"
553               }
554             }
555           }
556         },
557         "responses": {
558           "200": {
559             "description": "OK"
560           },
561           "204": {
562             "description": "Updated"
563           }
564         },
565         "description": "",
566         "summary": "PATCH - action-types - Controller - list"
567       }
568     },
569     "/rests/operations/action-types:list={name}/list-action": {
570       "post": {
571         "tags": [
572           "Controller action-types"
573         ],
574         "parameters": [
575           {
576             "name": "name",
577             "in": "path",
578             "required": true,
579             "schema": {
580               "type": "string"
581             }
582           }
583         ],
584         "requestBody": {
585           "description": "list-action_input",
586           "content": {
587             "application/xml": {
588               "schema": {
589                 "$ref": "#/components/schemas/action-types_list_list-action_input"
590               }
591             },
592             "application/json": {
593               "schema": {
594                 "properties": {
595                   "input": {
596                     "$ref": "#/components/schemas/action-types_list_list-action_input",
597                     "type": "object"
598                   }
599                 }
600               }
601             }
602           }
603         },
604         "responses": {
605           "200": {
606             "description": "RPC list-action success",
607             "content": {
608               "application/xml": {
609                 "schema": {
610                   "$ref": "#/components/schemas/action-types_list_list-action_output"
611                 }
612               },
613               "application/json": {
614                 "schema": {
615                   "$ref": "#/components/schemas/action-types_list_list-action_output"
616                 }
617               }
618             }
619           }
620         },
621         "description": "",
622         "summary": "POST - Controller - action-types - list-action"
623       }
624     },
625     "/rests/data/action-types:container": {
626       "get": {
627         "tags": [
628           "Controller action-types"
629         ],
630         "parameters": [
631           {
632             "name": "content",
633             "in": "query",
634             "required": false,
635             "schema": {
636               "enum": [
637                 "config",
638                 "nonconfig",
639                 "all"
640               ],
641               "type": "string"
642             }
643           }
644         ],
645         "responses": {
646           "200": {
647             "description": "200",
648             "content": {
649               "application/xml": {
650                 "schema": {
651                   "$ref": "#/components/schemas/action-types_container"
652                 }
653               },
654               "application/json": {
655                 "schema": {
656                   "properties": {
657                     "container": {
658                       "$ref": "#/components/schemas/action-types_container",
659                       "type": "object"
660                     }
661                   }
662                 }
663               }
664             }
665           }
666         },
667         "description": "",
668         "summary": "GET - Controller - action-types - container"
669       },
670       "put": {
671         "tags": [
672           "Controller action-types"
673         ],
674         "parameters": [],
675         "requestBody": {
676           "description": "container",
677           "content": {
678             "application/xml": {
679               "schema": {
680                 "$ref": "#/components/schemas/action-types_container"
681               }
682             },
683             "application/json": {
684               "schema": {
685                 "properties": {
686                   "action-types:container": {
687                     "$ref": "#/components/schemas/action-types_container",
688                     "type": "object"
689                   }
690                 }
691               }
692             }
693           }
694         },
695         "responses": {
696           "204": {
697             "description": "Updated"
698           },
699           "201": {
700             "description": "Created"
701           }
702         },
703         "description": "",
704         "summary": "PUT - action-types - Controller - container"
705       },
706       "delete": {
707         "tags": [
708           "Controller action-types"
709         ],
710         "parameters": [],
711         "responses": {
712           "204": {
713             "description": "Deleted"
714           }
715         },
716         "description": "",
717         "summary": "DELETE - Controller - action-types - container"
718       },
719       "patch": {
720         "tags": [
721           "Controller action-types"
722         ],
723         "parameters": [],
724         "requestBody": {
725           "description": "container",
726           "content": {
727             "application/yang-data+json": {
728               "schema": {
729                 "properties": {
730                   "action-types:container": {
731                     "$ref": "#/components/schemas/action-types_container",
732                     "type": "object"
733                   }
734                 }
735               }
736             },
737             "application/yang-data+xml": {
738               "schema": {
739                 "$ref": "#/components/schemas/action-types_container"
740               }
741             }
742           }
743         },
744         "responses": {
745           "200": {
746             "description": "OK"
747           },
748           "204": {
749             "description": "Updated"
750           }
751         },
752         "description": "",
753         "summary": "PATCH - action-types - Controller - container"
754       }
755     },
756     "/rests/operations/action-types:multi-container/inner-container/action": {
757       "post": {
758         "tags": [
759           "Controller action-types"
760         ],
761         "parameters": [],
762         "requestBody": {
763           "description": "action_input",
764           "content": {
765             "application/xml": {
766               "schema": {
767                 "xml": {
768                   "name": "input",
769                   "namespace": "urn:ietf:params:xml:ns:yang:test:action:types"
770                 },
771                 "type": "object"
772               }
773             },
774             "application/json": {
775               "schema": {
776                 "properties": {
777                   "input": {
778                     "type": "object"
779                   }
780                 },
781                 "type": "object"
782               }
783             }
784           }
785         },
786         "responses": {
787           "204": {
788             "description": "RPC action success"
789           }
790         },
791         "description": "",
792         "summary": "POST - Controller - action-types - action"
793       }
794     }
795   },
796   "components": {
797     "schemas": {
798       "action-types_list_list-action_input": {
799         "required": [
800           "la-input"
801         ],
802         "properties": {
803           "la-input": {
804             "description": "",
805             "type": "string",
806             "example": "Some la-input"
807           }
808         },
809         "xml": {
810           "name": "input",
811           "namespace": "urn:ietf:params:xml:ns:yang:test:action:types"
812         },
813         "title": "action-types_list_list-action_input",
814         "type": "object"
815       },
816       "action-types_container": {
817         "properties": {},
818         "xml": {
819           "name": "container",
820           "namespace": "urn:ietf:params:xml:ns:yang:test:action:types"
821         },
822         "title": "action-types_container",
823         "type": "object"
824       },
825       "action-types_multi-container": {
826         "properties": {
827           "inner-container": {
828             "$ref": "#/components/schemas/action-types_multi-container_inner-container"
829           }
830         },
831         "xml": {
832           "name": "multi-container",
833           "namespace": "urn:ietf:params:xml:ns:yang:test:action:types"
834         },
835         "title": "action-types_multi-container",
836         "type": "object"
837       },
838       "action-types_list_list-action_output": {
839         "required": [
840           "la-output"
841         ],
842         "properties": {
843           "la-output": {
844             "description": "",
845             "type": "string",
846             "example": "Some la-output"
847           }
848         },
849         "xml": {
850           "name": "output",
851           "namespace": "urn:ietf:params:xml:ns:yang:test:action:types"
852         },
853         "title": "action-types_list_list-action_output",
854         "type": "object"
855       },
856       "action-types_container_container-action_input": {
857         "required": [
858           "ca-input"
859         ],
860         "properties": {
861           "ca-input": {
862             "description": "",
863             "type": "string",
864             "example": "Some ca-input"
865           }
866         },
867         "xml": {
868           "name": "input",
869           "namespace": "urn:ietf:params:xml:ns:yang:test:action:types"
870         },
871         "title": "action-types_container_container-action_input",
872         "type": "object"
873       },
874       "action-types_multi-container_inner-container": {
875         "properties": {},
876         "xml": {
877           "name": "inner-container",
878           "namespace": "urn:ietf:params:xml:ns:yang:test:action:types"
879         },
880         "title": "action-types_multi-container_inner-container",
881         "type": "object"
882       },
883       "action-types_list": {
884         "properties": {
885           "name": {
886             "description": "",
887             "type": "string",
888             "example": "Some name"
889           }
890         },
891         "xml": {
892           "name": "list",
893           "namespace": "urn:ietf:params:xml:ns:yang:test:action:types"
894         },
895         "title": "action-types_list",
896         "type": "object"
897       },
898       "action-types_container_container-action_output": {
899         "required": [
900           "ca-output"
901         ],
902         "properties": {
903           "ca-output": {
904             "description": "",
905             "type": "string",
906             "example": "Some ca-output"
907           }
908         },
909         "xml": {
910           "name": "output",
911           "namespace": "urn:ietf:params:xml:ns:yang:test:action:types"
912         },
913         "title": "action-types_container_container-action_output",
914         "type": "object"
915       }
916     },
917     "securitySchemes": {
918       "basicAuth": {
919         "scheme": "basic",
920         "type": "http"
921       }
922     }
923   },
924   "security": [
925     {
926       "basicAuth": []
927     }
928   ]
929 }