[ONOS-3663] Add swagger doc for control metrics query REST API
Change-Id: Id8b667dabb64d11149b43cfeead57cf5ebd6997e
diff --git a/apps/cpman/app/src/main/resources/definitions/NetworkMetrics.json b/apps/cpman/app/src/main/resources/definitions/NetworkMetrics.json
new file mode 100644
index 0000000..91e282e
--- /dev/null
+++ b/apps/cpman/app/src/main/resources/definitions/NetworkMetrics.json
@@ -0,0 +1,137 @@
+{
+ "type": "object",
+ "title": "networks",
+ "required": [
+ "networks"
+ ],
+ "properties": {
+ "networks": {
+ "type": "object",
+ "required": [
+ "name",
+ "value"
+ ],
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "value": {
+ "type": "object",
+ "title": "metrics",
+ "required": [
+ "metrics"
+ ],
+ "properties": {
+ "metrics": {
+ "type": "array",
+ "xml": {
+ "name": "metrics",
+ "wrapped": true
+ },
+ "items": {
+ "type": "object",
+ "title": "metrics",
+ "required": [
+ "incomingBytes",
+ "outgoingBytes",
+ "incomingPackets",
+ "outgoingPackets"
+ ],
+ "properties": {
+ "incomingBytes": {
+ "type": "object",
+ "required": [
+ "time",
+ "latest",
+ "average"
+ ],
+ "properties": {
+ "time": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "latest": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "average": {
+ "type": "integer",
+ "format": "int64"
+ }
+ }
+ },
+ "outgoingBytes": {
+ "type": "object",
+ "required": [
+ "time",
+ "latest",
+ "average"
+ ],
+ "properties": {
+ "time": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "latest": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "average": {
+ "type": "integer",
+ "format": "int64"
+ }
+ }
+ },
+ "incomingPackets": {
+ "type": "object",
+ "required": [
+ "time",
+ "latest",
+ "average"
+ ],
+ "properties": {
+ "time": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "latest": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "average": {
+ "type": "integer",
+ "format": "int64"
+ }
+ }
+ },
+ "outgoingPackets": {
+ "type": "object",
+ "required": [
+ "time",
+ "latest",
+ "average"
+ ],
+ "properties": {
+ "time": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "latest": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "average": {
+ "type": "integer",
+ "format": "int64"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file