Jian Li
Committed by Gerrit Code Review

[ONOS-3601] Bugfix: resolve swagger doc issue of metric REST API

Change-Id: I76f04fbd3e7ed6aa2ab35dcb39bcbeacc9675282
......@@ -2,113 +2,19 @@
"type": "object",
"title": "metric",
"required": [
"name",
"metric"
],
"properties": {
"name": {
"type": "string",
"example": "cpu"
},
"metric": {
"type": "object",
"title": "metric",
"title": "property",
"optional": [
"counter",
"gauge",
"meter",
"histogram",
"timer"
"type"
],
"properties": {
"counter": {
"type": "object",
"required": [
"counter"
],
"properties": {
"counter": {
"type": "integer",
"example": "1"
}
}
},
"gauge": {
"type": "object",
"required": [
"value"
],
"properties": {
"value": "string",
"example": "1"
}
},
"meter": {
"type": "object",
"required": [
"counter",
"mean_rate",
"1_min_rate",
"5_min_rate",
"15_min_rate"
],
"properties": {
"counter": {
"type": "integer",
"example": "1"
},
"mean_rate": {
"type": "double",
"example": "1.0"
},
"1_min_rate": {
"type": "double",
"example": "1.0"
},
"5_min_rate": {
"type": "double",
"example": "1.0"
},
"15_min_rate": {
"type": "double",
"example": "1.0"
}
}
},
"histogram": {
"type": "object",
"required": [
"counter",
"mean",
"min",
"max",
"stddev"
],
"properties": {
"counter": {
"type": "integer",
"example": "1"
},
"mean": {
"type": "double",
"example": "1.0"
},
"min": {
"type": "double",
"example": "1.0"
},
"max": {
"type": "double",
"example": "1.0"
},
"stddev": {
"type": "double",
"example": "1.0"
}
}
},
"timer": {
"type": "object",
"title": "timer",
"required": [
"counter",
"mean_rate",
......
......@@ -8,119 +8,26 @@
"metrics": {
"type": "array",
"xml": {
"name": "metrics",
"name": "metric",
"wrapped": true
},
"items": {
"type": "object",
"title": "metric",
"required": [
"name",
"metric"
],
"properties": {
"name": {
"type": "string",
"example": "cpu"
},
"metric": {
"type": "object",
"title": "property",
"optional": [
"counter",
"gauge",
"meter",
"histogram",
"timer"
"type"
],
"properties": {
"counter": {
"type": "object",
"required": [
"counter"
],
"properties": {
"counter": {
"type": "integer",
"example": "1"
}
}
},
"gauge": {
"type": "object",
"required": [
"value"
],
"properties": {
"value": "string",
"example": "1"
}
},
"meter": {
"type": "object",
"required": [
"counter",
"mean_rate",
"1_min_rate",
"5_min_rate",
"15_min_rate"
],
"properties": {
"counter": {
"type": "integer",
"example": "1"
},
"mean_rate": {
"type": "double",
"example": "1.0"
},
"1_min_rate": {
"type": "double",
"example": "1.0"
},
"5_min_rate": {
"type": "double",
"example": "1.0"
},
"15_min_rate": {
"type": "double",
"example": "1.0"
}
}
},
"histogram": {
"type": "object",
"required": [
"counter",
"mean",
"min",
"max",
"stddev"
],
"properties": {
"counter": {
"type": "integer",
"example": "1"
},
"mean": {
"type": "double",
"example": "1.0"
},
"min": {
"type": "double",
"example": "1.0"
},
"max": {
"type": "double",
"example": "1.0"
},
"stddev": {
"type": "double",
"example": "1.0"
}
}
},
"timer": {
"type": "object",
"title": "timer",
"required": [
"counter",
"mean_rate",
......