Delete netconf
[controller.git] / opendaylight / md-sal / sal-rest-docgen / src / test / resources / sample-swagger-spec.json
1 {
2     "apiVersion": "1.0.0",
3     "swaggerVersion": "1.2",
4     "basePath": "/api",
5     "resourcePath": "/pet",
6     "produces": [
7         "application/json",
8         "application/xml",
9         "text/plain",
10         "text/html"
11     ],
12     "authorizations": {
13         "oauth2": [
14             {
15                 "scope": "write:pets",
16                 "description": "modify pets in your account"
17             },
18             {
19                 "scope": "read:pets",
20                 "description": "read your pets"
21             }
22         ]
23     },
24     "apis": [
25         {
26             "path": "/pet",
27             "operations": [
28                 {
29                     "method": "POST",
30                     "summary": "Add a new pet to the store",
31                     "notes": "",
32                     "type": "void",
33                     "nickname": "addPet",
34                     "consumes": [
35                         "application/json",
36                         "application/xml"
37                     ],
38                     "authorizations": {
39                         "oauth2": [
40                             {
41                                 "scope": "write:pets",
42                                 "description": "modify pets in your account"
43                             }
44                         ]
45                     },
46                     "parameters": [
47                         {
48                             "name": "body",
49                             "description": "Pet object that needs to be added to the store",
50                             "required": true,
51                             "type": "Pet",
52                             "paramType": "body"
53                         }
54                     ],
55                     "responseMessages": [
56                         {
57                             "code": 405,
58                             "message": "Invalid input"
59                         }
60                     ]
61                 },
62                 {
63                     "method": "PUT",
64                     "summary": "Update an existing pet",
65                     "notes": "",
66                     "type": "void",
67                     "nickname": "updatePet",
68                     "authorizations": {},
69                     "parameters": [
70                         {
71                             "name": "body",
72                             "description": "Pet object that needs to be updated in the store",
73                             "required": true,
74                             "type": "Pet",
75                             "paramType": "body"
76                         }
77                     ],
78                     "responseMessages": [
79                         {
80                             "code": 400,
81                             "message": "Invalid ID supplied"
82                         },
83                         {
84                             "code": 404,
85                             "message": "Pet not found"
86                         },
87                         {
88                             "code": 405,
89                             "message": "Validation exception"
90                         }
91                     ]
92                 }
93             ]
94         },
95         {
96             "path": "/pet/findByStatus",
97             "operations": [
98                 {
99                     "method": "GET",
100                     "summary": "Finds Pets by status",
101                     "notes": "<strong>Multiple status values can be provided with comma seperated strings</strong>",
102                     "type": "array",
103                     "items": {
104                         "$ref": "Pet"
105                     },
106                     "nickname": "testNodeType",
107                     "authorizations": {},
108                     "parameters": [
109                         {
110                             "name": "nodeTypez",
111                             "description": "Status values that need to be considered for filter",
112                             "defaultValue": "available",
113                             "required": true,
114                             "type": "string",
115                             "paramType": "query",
116                             "enum": [
117                                 "available",
118                                 "pending",
119                                 "sold"
120                             ]
121                         }
122                     ],
123                     "responseMessages": [
124                         {
125                             "code": 400,
126                             "message": "Invalid status value"
127                         }
128                     ]
129                 }
130             ]
131         },
132         {
133             "path": "/pet/findByTags",
134             "operations": [
135                 {
136                     "method": "GET",
137                     "summary": "Finds Pets by tags",
138                     "notes": "Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.",
139                     "type": "array",
140                     "items": {
141                         "$ref": "Pet"
142                     },
143                     "nickname": "findPetsByTags",
144                     "authorizations": {},
145                     "parameters": [
146                         {
147                             "name": "tags",
148                             "description": "Tags to filter by",
149                             "required": true,
150                             "type": "string",
151                             "paramType": "query"
152                         }
153                     ],
154                     "responseMessages": [
155                         {
156                             "code": 400,
157                             "message": "Invalid tag value"
158                         }
159                     ],
160                     "deprecated": "true"
161                 }
162             ]
163         },
164         {
165             "path": "/pet/{petId}",
166             "operations": [
167                 {
168                     "method": "PATCH",
169                     "summary": "partial updates to a pet",
170                     "notes": "",
171                     "type": "array",
172                     "items": {
173                         "$ref": "Pet"
174                     },
175                     "nickname": "partialUpdate",
176                     "produces": [
177                         "application/json",
178                         "application/xml"
179                     ],
180                     "consumes": [
181                         "application/json",
182                         "application/xml"
183                     ],
184                     "authorizations": {
185                         "oauth2": [
186                             {
187                                 "scope": "write:pets",
188                                 "description": "modify pets in your account"
189                             }
190                         ]
191                     },
192                     "parameters": [
193                         {
194                             "name": "petId",
195                             "description": "ID of pet that needs to be fetched",
196                             "required": true,
197                             "type": "string",
198                             "paramType": "path"
199                         },
200                         {
201                             "name": "body",
202                             "description": "Pet object that needs to be added to the store",
203                             "required": true,
204                             "type": "Pet",
205                             "paramType": "body"
206                         }
207                     ],
208                     "responseMessages": [
209                         {
210                             "code": 400,
211                             "message": "Invalid tag value"
212                         }
213                     ]
214                 },
215                 {
216                     "method": "POST",
217                     "summary": "Updates a pet in the store with form data",
218                     "notes": "",
219                     "type": "void",
220                     "nickname": "updatePetWithForm",
221                     "consumes": [
222                         "application/x-www-form-urlencoded"
223                     ],
224                     "authorizations": {
225                         "oauth2": [
226                             {
227                                 "scope": "write:pets",
228                                 "description": "modify pets in your account"
229                             }
230                         ]
231                     },
232                     "parameters": [
233                         {
234                             "name": "petId",
235                             "description": "ID of pet that needs to be updated",
236                             "required": true,
237                             "type": "string",
238                             "paramType": "path"
239                         },
240                         {
241                             "name": "name",
242                             "description": "Updated name of the pet",
243                             "required": false,
244                             "type": "string",
245                             "paramType": "form"
246                         },
247                         {
248                             "name": "status",
249                             "description": "Updated status of the pet",
250                             "required": false,
251                             "type": "string",
252                             "paramType": "form"
253                         }
254                     ],
255                     "responseMessages": [
256                         {
257                             "code": 405,
258                             "message": "Invalid input"
259                         }
260                     ]
261                 },
262                 {
263                     "method": "DELETE",
264                     "summary": "Deletes a pet",
265                     "notes": "",
266                     "type": "void",
267                     "nickname": "deletePet",
268                     "authorizations": {
269                         "oauth2": [
270                             {
271                                 "scope": "write:pets",
272                                 "description": "modify pets in your account"
273                             }
274                         ]
275                     },
276                     "parameters": [
277                         {
278                             "name": "petId",
279                             "description": "Pet id to delete",
280                             "required": true,
281                             "type": "string",
282                             "paramType": "path"
283                         }
284                     ],
285                     "responseMessages": [
286                         {
287                             "code": 400,
288                             "message": "Invalid pet value"
289                         }
290                     ]
291                 },
292                 {
293                     "method": "GET",
294                     "summary": "Find pet by ID",
295                     "notes": "Returns a pet based on ID",
296                     "type": "Pet",
297                     "nickname": "getPetById",
298                     "authorizations": {},
299                     "parameters": [
300                         {
301                             "name": "petId",
302                             "description": "ID of pet that needs to be fetched",
303                             "required": true,
304                             "type": "integer",
305                             "format": "int64",
306                             "paramType": "path",
307                             "minimum": "1.0",
308                             "maximum": "100000.0"
309                         }
310                     ],
311                     "responseMessages": [
312                         {
313                             "code": 400,
314                             "message": "Invalid ID supplied"
315                         },
316                         {
317                             "code": 404,
318                             "message": "Pet not found"
319                         }
320                     ]
321                 }
322             ]
323         },
324         {
325             "path": "/pet/uploadImage",
326             "operations": [
327                 {
328                     "method": "POST",
329                     "summary": "uploads an image",
330                     "notes": "",
331                     "type": "void",
332                     "nickname": "uploadFile",
333                     "consumes": [
334                         "multipart/form-data"
335                     ],
336                     "authorizations": {
337                         "oauth2": [
338                             {
339                                 "scope": "write:pets",
340                                 "description": "modify pets in your account"
341                             },
342                             {
343                                 "scope": "read:pets",
344                                 "description": "read your pets"
345                             }
346                         ]
347                     },
348                     "parameters": [
349                         {
350                             "name": "additionalMetadata",
351                             "description": "Additional data to pass to server",
352                             "required": false,
353                             "type": "string",
354                             "paramType": "form"
355                         },
356                         {
357                             "name": "file",
358                             "description": "file to upload",
359                             "required": false,
360                             "type": "File",
361                             "paramType": "body"
362                         }
363                     ]
364                 }
365             ]
366         }
367     ],
368     "models": {
369         "Tag": {
370             "id": "Tag",
371             "properties": {
372                 "id": {
373                     "type": "integer",
374                     "format": "int64"
375                 },
376                 "name": {
377                     "type": "string"
378                 }
379             }
380         },
381         "Pet": {
382             "id": "Pet",
383             "required": [
384                 "id",
385                 "name"
386             ],
387             "properties": {
388                 "id": {
389                     "type": "integer",
390                     "format": "int64",
391                     "description": "unique identifier for the pet",
392                     "minimum": "0.0",
393                     "maximum": "100.0"
394                 },
395                 "category": {
396                     "$ref": "Category"
397                 },
398                 "name": {
399                     "type": "string"
400                 },
401                 "photoUrls": {
402                     "type": "array",
403                     "items": {
404                         "type": "string"
405                     }
406                 },
407                 "tags": {
408                     "type": "array",
409                     "items": {
410                         "$ref": "Tag"
411                     }
412                 },
413                 "status": {
414                     "type": "string",
415                     "description": "pet status in the store",
416                     "enum": [
417                         "available",
418                         "pending",
419                         "sold"
420                     ]
421                 }
422             }
423         },
424         "Category": {
425             "id": "Category",
426             "properties": {
427                 "id": {
428                     "type": "integer",
429                     "format": "int64"
430                 },
431                 "name": {
432                     "type": "string"
433                 },
434                 "pet": {
435                     "$ref": "Pet"
436                 }
437             }
438         }
439     }
440 }