changeset 278:0e78f20b300f

Add descriptions for 'metric' types in API specs throughout. Reviewed-by: jkang Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2017-October/025342.html
author Miloslav Zezulka <mzezulka@redhat.com>
date Tue, 10 Oct 2017 11:58:42 +0200
parents 4309cfea7f05
children 4ef47fad072a
files services/jvm-cpu/src/main/resources/jvm-cpu-swagger.yaml services/jvm-gc/src/main/resources/jvm-gc-swagger.yaml services/jvm-io/src/main/resources/jvm-io-swagger.yaml
diffstat 3 files changed, 12 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/services/jvm-cpu/src/main/resources/jvm-cpu-swagger.yaml	Mon Oct 16 15:18:07 2017 +0200
+++ b/services/jvm-cpu/src/main/resources/jvm-cpu-swagger.yaml	Tue Oct 10 11:58:42 2017 +0200
@@ -92,7 +92,9 @@
       programTicks:
         $ref: '#/definitions/metric'
       timeStamp:
-        $ref: '#/definitions/timeStamp'
+        allOf:
+          - $ref: '#/definitions/metric'
+          - description: UNIX timestamp in milliseconds
       agentId:
         $ref: '#/definitions/metric'
       jvmId:
@@ -102,12 +104,6 @@
     properties:
       $numberLong:
         type: string
-  timeStamp:
-    description: UNIX timestamp in milliseconds
-    type: object
-    properties:
-      $numberLong:
-        type: string
   metadata:
     type: object
     properties:
--- a/services/jvm-gc/src/main/resources/jvm-gc-swagger.yaml	Mon Oct 16 15:18:07 2017 +0200
+++ b/services/jvm-gc/src/main/resources/jvm-gc-swagger.yaml	Tue Oct 10 11:58:42 2017 +0200
@@ -117,7 +117,9 @@
       jvmId:
         type: string
       timeStamp:
-        $ref: '#/definitions/timestamp'
+        allOf:
+          - $ref: '#/definitions/metric'
+          - description: UNIX timestamp in milliseconds
       collectorName:
         type: string
       runCount:
@@ -141,7 +143,9 @@
         jvmId:
           type: string
         timeStamp:
-          $ref: '#/definitions/timestamp'
+          allOf:
+            - $ref: '#/definitions/metric'
+            - description: UNIX timestamp in milliseconds
         collectorName:
           type: string
         runCount:
@@ -155,12 +159,6 @@
     properties:
       $numberLong:
         type: string
-  timestamp:
-    description: UNIX timestamp in milliseconds
-    type: object
-    properties:
-      $numberLong:
-        type: string
   metadata:
     type: object
     properties:
--- a/services/jvm-io/src/main/resources/jvm-io-swagger.yaml	Mon Oct 16 15:18:07 2017 +0200
+++ b/services/jvm-io/src/main/resources/jvm-io-swagger.yaml	Tue Oct 10 11:58:42 2017 +0200
@@ -100,7 +100,9 @@
       jvmId:
         type: string
       timeStamp:
-        $ref: '#/definitions/timestamp'
+        allOf:
+          - $ref: '#/definitions/metric'
+          - description: UNIX timestamp in milliseconds
       charactersRead:
         $ref: '#/definitions/metric'
       charactersWritten:
@@ -136,12 +138,6 @@
     properties:
       $numberLong:
         type: string
-  timestamp:
-    description: UNIX timestamp in milliseconds
-    type: object
-    properties:
-      $numberLong:
-        type: string
   put-body:
     type: object
     properties: