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