Mercurial > hg > thermostat-ng > web-gateway
changeset 288:45826353de65
Clean up swagger files
Reviewed-by: stooke
Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2017-October/025491.html
author | Jie Kang <jkang@redhat.com> |
---|---|
date | Mon, 23 Oct 2017 09:07:47 -0400 |
parents | ede4435b3682 |
children | 0c455094e241 |
files | services/jcmd/src/main/resources/jcmd-swagger.yaml services/jvm-byteman/src/main/resources/jvm-byteman-swagger.yaml services/jvm-classstat/src/main/resources/jvm-classstat-swagger.yaml services/jvm-cpu/src/main/resources/jvm-cpu-swagger.yaml services/jvm-gc/src/main/resources/jvm-gc-swagger.yaml services/system-cpu/src/main/resources/system-cpu-swagger.yaml services/system-memory/src/main/resources/system-memory-swagger.yaml services/system-network/src/main/resources/system-network-swagger.yaml services/systems/src/main/resources/systems-swagger.yaml |
diffstat | 9 files changed, 75 insertions(+), 77 deletions(-) [+] |
line wrap: on
line diff
--- a/services/jcmd/src/main/resources/jcmd-swagger.yaml Fri Oct 20 08:35:16 2017 -0400 +++ b/services/jcmd/src/main/resources/jcmd-swagger.yaml Mon Oct 23 09:07:47 2017 -0400 @@ -47,7 +47,9 @@ jvmId: type: string timeStamp: - $ref: '#/definitions/timestamp' + allOf: + - $ref: '#/definitions/metric' + - description: UNIX timestamp in milliseconds payload: type: string metadata: @@ -72,8 +74,7 @@ elapsed: type: integer format: int64 - timestamp: - description: UNIX timestamp in milliseconds + metric: type: object properties: $numberLong:
--- a/services/jvm-byteman/src/main/resources/jvm-byteman-swagger.yaml Fri Oct 20 08:35:16 2017 -0400 +++ b/services/jvm-byteman/src/main/resources/jvm-byteman-swagger.yaml Mon Oct 23 09:07:47 2017 -0400 @@ -34,7 +34,7 @@ post: description: Add a Byteman status. parameters: - - $ref: '#/parameters/jvm-byteman-status' + - $ref: '#/parameters/jvm-byteman-status-array' - $ref: '#/parameters/metadata' responses: '200': @@ -106,7 +106,9 @@ jvmId: type: string timeStamp: - $ref: '#/definitions/timestamp' + allOf: + - $ref: '#/definitions/metric' + - description: UNIX timestamp in milliseconds marker: type: string payload: @@ -119,7 +121,9 @@ jvmId: type: string timeStamp: - $ref: '#/definitions/timestamp' + allOf: + - $ref: '#/definitions/metric' + - description: UNIX timestamp in milliseconds rule: type: string listenPort: @@ -167,17 +171,11 @@ elapsed: type: integer format: int64 - timestamp: - description: UNIX timestamp in milliseconds + metric: type: object properties: $numberLong: type: string - put-body: - type: object - properties: - "set": - type: object parameters: system-id: name: systemId @@ -189,13 +187,6 @@ in: path required: true type: string - jvm-byteman-status: - name: jvm-byteman-status - in: body - description: The jvm byteman status - required: true - schema: - $ref: '#/definitions/jvm-byteman-status-array' jvm-byteman-status-array: name: jvm-byteman-status-array in: body @@ -210,13 +201,6 @@ required: true schema: $ref: '#/definitions/jvm-byteman-metrics-array' - put-body: - name: putBody - in: body - description: "The JSON object containing a 'set' object. This contains single item JSON objects that specify the field to replace and the JSON value to replace with. Example { \"set\" : { \"field\" : \"value\", \"field2\":{\"object\":\"item\"} }" - required: true - schema: - $ref: '#/definitions/put-body' limit: name: limit in: query
--- a/services/jvm-classstat/src/main/resources/jvm-classstat-swagger.yaml Fri Oct 20 08:35:16 2017 -0400 +++ b/services/jvm-classstat/src/main/resources/jvm-classstat-swagger.yaml Mon Oct 23 09:07:47 2017 -0400 @@ -101,9 +101,9 @@ - $ref: '#/definitions/metric' - description: UNIX timestamp in milliseconds agentId: - $ref: '#/definitions/metric' + type: string jvmId: - $ref: '#/definitions/metric' + type: string metric: type: object properties:
--- a/services/jvm-cpu/src/main/resources/jvm-cpu-swagger.yaml Fri Oct 20 08:35:16 2017 -0400 +++ b/services/jvm-cpu/src/main/resources/jvm-cpu-swagger.yaml Mon Oct 23 09:07:47 2017 -0400 @@ -96,9 +96,9 @@ - $ref: '#/definitions/metric' - description: UNIX timestamp in milliseconds agentId: - $ref: '#/definitions/metric' + type: string jvmId: - $ref: '#/definitions/metric' + type: string metric: type: object properties:
--- a/services/jvm-gc/src/main/resources/jvm-gc-swagger.yaml Fri Oct 20 08:35:16 2017 -0400 +++ b/services/jvm-gc/src/main/resources/jvm-gc-swagger.yaml Mon Oct 23 09:07:47 2017 -0400 @@ -136,24 +136,24 @@ items: $ref: '#/definitions/jvm-gc-delta-stat' jvm-gc-delta-stat: - type: object - properties: - agentId: - type: string - jvmId: - type: string - timeStamp: - allOf: - - $ref: '#/definitions/metric' - - description: UNIX timestamp in milliseconds - collectorName: - type: string - runCount: - $ref: '#/definitions/metric' - wallTimeInMicros: - $ref: '#/definitions/metric' - wallTimeDelta: - $ref: '#/definitions/metric' + type: object + properties: + agentId: + type: string + jvmId: + type: string + timeStamp: + allOf: + - $ref: '#/definitions/metric' + - description: UNIX timestamp in milliseconds + collectorName: + type: string + runCount: + $ref: '#/definitions/metric' + wallTimeInMicros: + $ref: '#/definitions/metric' + wallTimeDelta: + $ref: '#/definitions/metric' metric: type: object properties:
--- a/services/system-cpu/src/main/resources/system-cpu-swagger.yaml Fri Oct 20 08:35:16 2017 -0400 +++ b/services/system-cpu/src/main/resources/system-cpu-swagger.yaml Mon Oct 23 09:07:47 2017 -0400 @@ -68,14 +68,20 @@ type: string agentId: type: string - timestamp: - type: integer - format: int64 + timeStamp: + allOf: + - $ref: '#/definitions/metric' + - description: UNIX timestamp in milliseconds perProcessorUsage: type: array items: type: integer format: int64 + metric: + type: object + properties: + $numberLong: + type: string cpu-info-put-body: type: object properties:
--- a/services/system-memory/src/main/resources/system-memory-swagger.yaml Fri Oct 20 08:35:16 2017 -0400 +++ b/services/system-memory/src/main/resources/system-memory-swagger.yaml Mon Oct 23 09:07:47 2017 -0400 @@ -68,30 +68,29 @@ type: string agentId: type: string - timestamp: - type: integer - format: int64 + timeStamp: + allOf: + - $ref: '#/definitions/metric' + - description: UNIX timestamp in milliseconds total: - type: integer - format: int64 + $ref: '#/definitions/metric' free: - type: integer - format: int64 + $ref: '#/definitions/metric' buffers: - type: integer - format: int64 + $ref: '#/definitions/metric' cached: - type: integer - format: int64 + $ref: '#/definitions/metric' swapTotal: - type: integer - format: int64 + $ref: '#/definitions/metric' swapFree: - type: integer - format: int64 + $ref: '#/definitions/metric' commitLimit: - type: integer - format: int64 + $ref: '#/definitions/metric' + metric: + type: object + properties: + $numberLong: + type: string memory-info-put-body: type: object properties:
--- a/services/system-network/src/main/resources/system-network-swagger.yaml Fri Oct 20 08:35:16 2017 -0400 +++ b/services/system-network/src/main/resources/system-network-swagger.yaml Mon Oct 23 09:07:47 2017 -0400 @@ -69,8 +69,9 @@ agentId: type: string timeStamp: - type: integer - format: int64 + allOf: + - $ref: '#/definitions/metric' + - description: UNIX timestamp in milliseconds interfaces: type: array items: @@ -91,6 +92,11 @@ properties: "set": type: object + metric: + type: object + properties: + $numberLong: + type: string parameters: system-id: name: systemId
--- a/services/systems/src/main/resources/systems-swagger.yaml Fri Oct 20 08:35:16 2017 -0400 +++ b/services/systems/src/main/resources/systems-swagger.yaml Mon Oct 23 09:07:47 2017 -0400 @@ -98,19 +98,21 @@ cpuModel: type: string totalMemory: - type: integer - format: int64 + $ref: '#/definitions/metric' timeCreated: - type: integer - format: int64 + $ref: '#/definitions/metric' lastUpdated: - type: integer - format: int64 + $ref: '#/definitions/metric' systems-put-body: type: object properties: "set": type: object + metric: + type: object + properties: + $numberLong: + type: string parameters: system-id: name: systemId