X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-rest-docgen%2Fsrc%2Ftest%2Fresources%2Ftoaster.json;fp=opendaylight%2Fmd-sal%2Fsal-rest-docgen%2Fsrc%2Ftest%2Fresources%2Ftoaster.json;h=8af246254d573b22c3dae7e57085309833e834f5;hb=2e8e671a52614978de6940919fc677625dc25def;hp=0000000000000000000000000000000000000000;hpb=61bad4207cc91cd14d8d38a255ad6549c20ff54e;p=controller.git diff --git a/opendaylight/md-sal/sal-rest-docgen/src/test/resources/toaster.json b/opendaylight/md-sal/sal-rest-docgen/src/test/resources/toaster.json new file mode 100644 index 0000000000..8af246254d --- /dev/null +++ b/opendaylight/md-sal/sal-rest-docgen/src/test/resources/toaster.json @@ -0,0 +1,167 @@ +{ + "apiVersion": "1.0.0", + "swaggerVersion": "1.2", + "basePath": "/api", + "resourcePath": "/toaster", + "produces": [ + "application/json", + "application/xml", + "text/plain", + "text/html" + ], + "apis": [ + { + "path": "/toaster", + "operations": [ + { + "method": "POST", + "summary": "Add a new toaster", + "notes": "", + "type": "void", + "nickname": "add toaster", + "consumes": [ + "application/json", + "application/xml" + ], + "parameters": [ + { + "name": "body", + "description": "Pet object that needs to be added to the store", + "required": true, + "type": "Toaster", + "paramType": "body" + } + ], + "responseMessages": [ + { + "code": 405, + "message": "Invalid input" + } + ] + } + ] + }, + { + "path": "/toaster", + "operations": [ + { + "method": "GET", + "summary": "Add a new toaster", + "notes": "", + "type": "Toaster", + "nickname": "Get toaster", + "consumes": [ + "application/json", + "application/xml" + ], + "responseMessages": [ + { + "code": 405, + "message": "Invalid input" + } + ] + } + ] + }, + { + "path" : "operations/toaster/cancel-toast", + "operations" : [ { + "method" : "POST", + "summary" : null, + "notes" : "Stop making toast, if any is being made.\n A 'resource-denied' error will be returned \n if the toaster service is disabled.", + "type" : null, + "nickname" : "cancel-toast", + "consumes" : null, + "parameters" : null, + "responseMessages" : null + } ] + }, { + "path" : "operations/toaster/make-toast", + "operations" : [ { + "method" : "POST", + "summary" : null, + "notes" : "Make some toast.\n The toastDone notification will be sent when \n the toast is finished.\n An 'in-use' error will be returned if toast\n is already being made.\n A 'resource-denied' error will be returned \n if the toaster service is disabled.", + "type" : null, + "nickname" : "make-toast", + "consumes" : null, + "parameters" : null, + "responseMessages" : null + } ] + } + ], + "models": { + "Toaster": { + "id":"Toaster", + "$schema": "http://json-schema.org/draft-04/schema", + "description": "Top-level container for all toaster database objects.", + "properties": { + "allow-user": { + "description": "A list of user name patterns to allow", + "items": {"type": "string"}, + "required": false, + "type": "array" + }, + "how": { + "oneOf": [ + { + "manual": {"manual": { + "required": false, + "type": "string" + }}, + "type": "object" + }, + { + "interval": {"interval": { + "required": false, + "type": "integer" + }}, + "type": "object" + }, + { + "daily": { + "daily": { + "required": false, + "type": "string" + }, + "time-of-day": { + "required": false, + "type": "string" + } + }, + "type": "object" + } + ], + "type": "object" + }, + "testToasterBits": { + "enum": [ + "testbit1", + "testbit2" + ], + "minItems": 0, + "required": false, + "type": "String", + "uniqueItems": true + }, + "toasterManufacturer": { + "description": "The name of the toaster's manufacturer. For instance, \n Microsoft Toaster.", + "required": true, + "type": "string" + }, + "toasterModelNumber": { + "description": "The name of the toaster's model. For instance,\n Radiant Automatic.", + "required": true, + "type": "string" + }, + "toasterStatus": { + "description": "This variable indicates the current state of \n the toaster.", + "enum": [ + "up", + "down" + ], + "required": true + } + } + } + } +}