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