Add a schema for taskResult
authorBoyeon <boyeon.son@samsung.com>
Wed, 8 May 2019 07:38:29 +0000 (16:38 +0900)
committerBoyeon <boyeon.son@samsung.com>
Wed, 8 May 2019 07:38:29 +0000 (16:38 +0900)
schema/taskResult.json [new file with mode: 0644]

diff --git a/schema/taskResult.json b/schema/taskResult.json
new file mode 100644 (file)
index 0000000..e3e6e7b
--- /dev/null
@@ -0,0 +1,70 @@
+{
+  "$schema": "http://json-schema.org/draft-07/schema",
+  "$id": "http://tizen.org/taskResult.json",
+  "title": "Task Result",
+  "description": "Schema for getting the result of task",
+  "type": "object",
+  "required": [
+    "time",
+    "status"
+  ],
+  "properties": {
+    "type": {
+      "$id": "#/properties/time",
+      "description": "Current time in unix timestamp",
+      "type": "integer",
+      "examples": [
+        100000000
+      ]
+    },
+    "status": {
+      "$id": "#/properties/status",
+      "description": "Status of task being performed",
+      "type": "array",
+      "items": {
+        "$id": "#/properties/status/items",
+        "type": "object",
+        "required": [
+          "appId",
+          "cpuSnapshot",
+          "cpuAverage",
+          "memory"
+        ],
+        "properties": {
+          "appId": {
+            "$id": "#/properties/status/items/properties/appId",
+            "description": "ID of the application in which the task in peformed",
+            "type": "string",
+            "examples": [
+              "com.example.example1"
+            ]
+          },
+          "cpuSnapshot": {
+            "$id": "#/properties/status/items/properties/cpuSnapshot",
+            "description": "CPU usage at a certain point",
+            "type": "integer",
+            "examples": [
+              5
+            ]
+          },
+          "cpuAverage": {
+            "$id": "#/properties/status/items/properties/cpuAverage",
+            "description": "Average CPU usage during the task performance",
+            "type": "integer",
+            "examples": [
+              15
+            ]
+          },
+          "memory": {
+            "$id": "#/properties/status/items/properties/memory",
+            "description": "Memory usage during the task performance",
+            "type": "integer",
+            "examples": [
+              1024
+            ]
+          }
+        }
+      }
+    }
+  }
+}
\ No newline at end of file