6df0a4ca7e1117105f2872755ce86b4f745faf33
[netconf.git] / restconf / restconf-openapi / src / test / resources / yang-document / device-string-from-regex.json
1 {
2   "openapi": "3.0.3",
3   "info": {
4     "version": "1.0.0",
5     "title": "strings-from-regex",
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/nodes/node=123/yang-ext:mount/strings-from-regex:test": {
15       "get": {
16         "tags": [
17           "123 strings-from-regex"
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/strings-from-regex_test"
41                 }
42               },
43               "application/json": {
44                 "schema": {
45                   "properties": {
46                     "test": {
47                       "$ref": "#/components/schemas/strings-from-regex_test",
48                       "type": "object"
49                     }
50                   }
51                 }
52               }
53             }
54           }
55         },
56         "description": "",
57         "summary": "GET - 123 - strings-from-regex - test"
58       },
59       "put": {
60         "tags": [
61           "123 strings-from-regex"
62         ],
63         "parameters": [],
64         "requestBody": {
65           "description": "test",
66           "content": {
67             "application/xml": {
68               "schema": {
69                 "$ref": "#/components/schemas/strings-from-regex_test"
70               }
71             },
72             "application/json": {
73               "schema": {
74                 "properties": {
75                   "strings-from-regex:test": {
76                     "$ref": "#/components/schemas/strings-from-regex_test",
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 - strings-from-regex - 123 - test"
94       },
95       "delete": {
96         "tags": [
97           "123 strings-from-regex"
98         ],
99         "parameters": [],
100         "responses": {
101           "204": {
102             "description": "Deleted"
103           }
104         },
105         "description": "",
106         "summary": "DELETE - 123 - strings-from-regex - test"
107       },
108       "patch": {
109         "tags": [
110           "123 strings-from-regex"
111         ],
112         "parameters": [],
113         "requestBody": {
114           "description": "test",
115           "content": {
116             "application/yang-data+json": {
117               "schema": {
118                 "properties": {
119                   "strings-from-regex:test": {
120                     "$ref": "#/components/schemas/strings-from-regex_test",
121                     "type": "object"
122                   }
123                 }
124               }
125             },
126             "application/yang-data+xml": {
127               "schema": {
128                 "$ref": "#/components/schemas/strings-from-regex_test"
129               }
130             }
131           }
132         },
133         "responses": {
134           "200": {
135             "description": "OK"
136           },
137           "204": {
138             "description": "Updated"
139           }
140         },
141         "description": "",
142         "summary": "PATCH - strings-from-regex - 123 - test"
143       }
144     },
145     "/rests/data/nodes/node=123/yang-ext:mount": {
146       "post": {
147         "tags": [
148           "123 strings-from-regex"
149         ],
150         "parameters": [],
151         "requestBody": {
152           "description": "test",
153           "content": {
154             "application/xml": {
155               "schema": {
156                 "$ref": "#/components/schemas/strings-from-regex_test"
157               }
158             },
159             "application/json": {
160               "schema": {
161                 "properties": {
162                   "test": {
163                     "$ref": "#/components/schemas/strings-from-regex_test",
164                     "type": "object"
165                   }
166                 }
167               }
168             }
169           }
170         },
171         "responses": {
172           "201": {
173             "description": "Created"
174           }
175         },
176         "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",
177         "summary": "POST - 123 - strings-from-regex - strings-from-regex"
178       }
179     }
180   },
181   "components": {
182     "schemas": {
183       "strings-from-regex_test": {
184         "properties": {
185           "mac-address": {
186             "description": "",
187             "type": "string",
188             "example": "00:00:00:00:00:00",
189             "minLength": 0,
190             "maxLength": 2147483647
191           },
192           "ipv4-address": {
193             "description": "",
194             "type": "string",
195             "example": "0.0.0.0",
196             "minLength": 0,
197             "maxLength": 2147483647
198           },
199           "login-date-time": {
200             "description": "",
201             "type": "string",
202             "example": "0000-00-00T00:00:00Z",
203             "minLength": 0,
204             "maxLength": 2147483647
205           }
206         },
207         "xml": {
208           "name": "test",
209           "namespace": "urn:ietf:params:xml:ns:yang:strings:regex"
210         },
211         "description": "",
212         "title": "strings-from-regex_test",
213         "type": "object"
214       }
215     },
216     "securitySchemes": {
217       "basicAuth": {
218         "scheme": "basic",
219         "type": "http"
220       }
221     }
222   },
223   "security": [
224     {
225       "basicAuth": []
226     }
227   ]
228 }