Bug: 627
[controller.git] / opendaylight / md-sal / sal-rest-docgen / src / test / resources / topology-good.json
diff --git a/opendaylight/md-sal/sal-rest-docgen/src/test/resources/topology-good.json b/opendaylight/md-sal/sal-rest-docgen/src/test/resources/topology-good.json
new file mode 100644 (file)
index 0000000..4017829
--- /dev/null
@@ -0,0 +1,106 @@
+{
+    "apiVersion": "1.0.0",
+    "swaggerVersion": "1.2",
+    "basePath": "/api",
+    "resourcePath": "/config",
+    "produces": [ "application/json", "application/xml" ],
+    "apis": [
+        {
+            "path": "/network-topology:network-topology/network-topology",
+            "operations": [
+                {
+                    "method": "GET",
+                    "summary": "Test",
+                    "notes": "",
+                    "type": "Toaster",
+                    "nickname": "something",
+                    "consumes": [
+                        "application/json",
+                        "application/xml"
+                    ],
+                    "responseMessages": [
+                        {
+                            "code": 405,
+                            "message": "Invalid input"
+                        }
+                    ]
+                }
+            ]
+        }
+    ],
+    "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
+                }
+            }
+        }
+    }
+}
\ No newline at end of file