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

index 4b9b754..10b267c 100644 (file)
@@ -2,7 +2,7 @@
   "$schema": "http://json-schema.org/draft-07/schema",
   "$id": "http://tizen.org/logArchiveRequest.json",
   "title": "Log Archive Request",
-  "description": "Generating and saving the archive file of logs",
+  "description": "Schema for generating and saving the archive file of logs",
   "type": "object",
   "required": [
     "logPath",
       "type": "string",
       "examples": [
         [
-        "/home/owner/org.example.test/data/logs1",
-        "/home/owner/org.example.test/data/logs2"
-        ],
-        [
-        "/home/owner/org.example.test/data/log1",
-        "/home/owner/org.example.test/data/log2/logFile.log"
+          "/home/owner/org.example.test/data/logs1",
+          "/home/owner/org.example.test/data/logs2",
+          "/home/owner/org.example.test/data/logs3/logFile.log"
         ]
       ]
     }
index b196bb4..6d87e1e 100644 (file)
@@ -2,7 +2,7 @@
   "$schema": "http://json-schema.org/draft-07/schema",
   "$id": "http://tizen.org/logArchiveResult.json",
   "title": "Log Archive Result",
-  "description": "Getting the result of log archive",
+  "description": "Schema for getting the result of log archive",
   "type": "object",
   "required": [
     "logPath",
diff --git a/schema/taskRequest.json b/schema/taskRequest.json
new file mode 100644 (file)
index 0000000..56eecb6
--- /dev/null
@@ -0,0 +1,38 @@
+{
+  "$schema": "http://json-schema.org/draft-07/schema",
+  "$id": "http://tizen.org/taskRequest.json",
+  "title": "Task Request",
+  "description": "Schema for making task request",
+  "type": "object",
+  "required": [
+    "type",
+    "duration",
+    "period"
+  ],
+  "properties": {
+    "type": {
+      "$id": "#/properties/type",
+      "description": "Type of the task",
+      "type": "integer",
+      "examples": [
+        1
+      ]
+    },
+    "duration": {
+      "$id": "#/properties/duration",
+      "description": "How long the task to be performed for (in sec)",
+      "type": "integer",
+      "examples": [
+        30
+      ]
+    },
+    "period": {
+      "$id": "#/properties/period",
+      "description": "How frequent the task to be repeated (in sec)",
+      "type": "integer",
+      "examples": [
+        1
+      ]
+    }
+  }
+}
\ No newline at end of file