[sample] JSON Schema for sysinfo request/result
authorEunyoung Lee <ey928.lee@samsung.com>
Fri, 17 May 2019 06:50:23 +0000 (15:50 +0900)
committer이은영/Tizen Platform Lab(SR)/Engineer/삼성전자 <ey928.lee@samsung.com>
Mon, 20 May 2019 06:13:21 +0000 (15:13 +0900)
schema/sysInfoRequest.json [new file with mode: 0644]
schema/sysInfoResult.json [new file with mode: 0644]

diff --git a/schema/sysInfoRequest.json b/schema/sysInfoRequest.json
new file mode 100644 (file)
index 0000000..a8a17ec
--- /dev/null
@@ -0,0 +1,79 @@
+{
+       "$schema": "http://json-schema.org/draft-07/schema#",
+       "$id": "http://tizen.org/sysInfoRequest.json",
+       "type": "object",
+       "title": "The System Information Request Schema",
+       "description": "Request for receiving the system information",
+       "required": [
+         "feature",
+         "system"
+       ],
+       "properties": {
+         "feature": {
+               "$id": "#/properties/feature",
+               "type": "array",
+               "title": "The Feature Schema",
+        "description": "Checking for supported features",
+               "items": {
+                 "$id": "#/properties/feature/items",
+                 "type": "object",
+                 "required": [
+                       "key",
+                       "type"
+                 ],
+                 "properties": {
+                       "key": {
+                         "$id": "#/properties/feature/items/properties/key",
+                         "type": "string",
+                         "description": "Feature key for checking supported features",
+                         "examples": [
+                               "profile"
+                         ]
+                       },
+                       "type": {
+                         "$id": "#/properties/feature/items/properties/type",
+                         "type": "string",
+              "enum" : ["bool", "int", "string"],
+                         "description": "Type of the value that the feature key represents",
+                         "examples": [
+                               "string"
+                         ]
+                       }
+                 }
+               }
+         },
+         "system": {
+               "$id": "#/properties/system",
+               "type": "array",
+               "title": "The System Schema",
+        "description": "Getting the system information",
+               "items": {
+                 "$id": "#/properties/system/items",
+                 "type": "object",
+                 "required": [
+                       "key",
+                       "type"
+                 ],
+                 "properties": {
+                       "key": {
+                         "$id": "#/properties/system/items/properties/key",
+                         "type": "string",
+                         "description": "System key for getting the system information",
+                         "examples": [
+                               "build.date"
+                         ]
+                       },
+                       "type": {
+                         "$id": "#/properties/system/items/properties/type",
+                         "type": "string",
+                         "enum" : ["bool", "int", "string"],
+              "defaudescriptionlt": "Type of the value that the system key represents",
+              "examples": [
+                               "string"
+                         ]
+                       }
+                 }
+               }
+         }
+       }
+  }
diff --git a/schema/sysInfoResult.json b/schema/sysInfoResult.json
new file mode 100644 (file)
index 0000000..ef1f031
--- /dev/null
@@ -0,0 +1,207 @@
+{
+       "$schema": "http://json-schema.org/draft-07/schema#",
+       "$id": "http://tizen.org/sysInfoResult.json",
+       "type": "object",
+       "title": "The System Information Result Schema",
+       "description": "Result of the system information request",
+       "required": [
+         "default",
+         "feature",
+         "system"
+       ],
+       "properties": {
+         "default": {
+               "$id": "#/properties/default",
+               "type": "object",
+               "title": "The Default Schema",
+        "description": "Default values passed as a result",
+               "required": [
+                 "manufacturer",
+                 "profile",
+                 "modelName",
+                 "platformVersion",
+                 "processor",
+                 "processorCount",
+                 "memorySize",
+                 "build",
+                 "buildRelease",
+                 "buildType",
+                 "buildDate"
+               ],
+               "properties": {
+                 "manufacturer": {
+                       "$id": "#/properties/default/properties/manufacturer",
+                       "type": "string",
+                       "description": "The manufacturer name",
+                       "examples": [
+                         "Tizen"
+                       ]
+                 },
+                 "profile": {
+                       "$id": "#/properties/default/properties/profile",
+                       "type": "string",
+                       "description": "A compliant device profile such as 'mobile' or 'wearable'",
+                       "examples": [
+                         "common"
+                       ]
+                 },
+                 "modelName": {
+                       "$id": "#/properties/default/properties/modelName",
+                       "type": "string",
+                       "description": "The device model name",
+                       "examples": [
+                         "rpi3"
+                       ]
+                 },
+                 "platformVersion": {
+                       "$id": "#/properties/default/properties/platformVersion",
+                       "type": "string",
+                       "description": "The version of the platform in '[Major].[Minor].[Patch Version]' format",
+                       "examples": [
+                         "5.5"
+                       ]
+                 },
+                 "processor": {
+                       "$id": "#/properties/default/properties/processor",
+                       "type": "string",
+                       "description": "The device processor name",
+                       "examples": [
+                         "BCM2837"
+                       ]
+                 },
+                 "processorCount": {
+                       "$id": "#/properties/default/properties/processorCount",
+                       "type": "integer",
+                       "description": "The number of processors",
+                       "examples": [
+                         4
+                       ]
+                 },
+                 "memorySize": {
+                       "$id": "#/properties/default/properties/memorySize",
+                       "type": "integer",
+                       "description": "The physical memory size(KiB)",
+                       "examples": [
+                         917504
+                       ]
+                 },
+                 "build": {
+                       "$id": "#/properties/default/properties/build",
+                       "type": "string",
+                       "description": "The build version information string that is made when the platform image is created",
+                       "examples": [
+                         "tizen-unified_20190316.2"
+                       ]
+                 },
+                 "buildRelease": {
+                       "$id": "#/properties/default/properties/buildRelease",
+                       "type": "string",
+                       "description": "The build version information that is made when the platform image is created",
+                       "examples": [
+                         "20190316.2"
+                       ]
+                 },
+                 "buildType": {
+                       "$id": "#/properties/default/properties/buildType",
+                       "type": "string",
+                       "description": "The build type, such as 'user' or 'eng', that is made when the platform image is created",
+                       "examples": [
+                         "user"
+                       ]
+                 },
+                 "buildDate": {
+                       "$id": "#/properties/default/properties/buildDate",
+                       "type": "string",
+                       "description": "The build date that is made when the platform image is created",
+                       "examples": [
+                         "20190316_214915"
+                       ]
+                 }
+               }
+         },
+         "feature": {
+               "$id": "#/properties/feature",
+               "type": "array",
+               "title": "The Feature Schema",
+        "description": "Verified supported features",
+               "items": {
+                 "$id": "#/properties/feature/items",
+                 "type": "object",
+                 "required": [
+                       "key",
+                       "type",
+                       "value"
+                 ],
+                 "properties": {
+                       "key": {
+                         "$id": "#/properties/feature/items/properties/key",
+                         "type": "string",
+                         "description": "Feature key for checking supported features",
+                         "examples": [
+                               "plaform.version.name"
+                         ]
+                       },
+                       "type": {
+                         "$id": "#/properties/feature/items/properties/type",
+                         "type": "string",
+                         "enum" : ["bool", "int", "string"],
+                         "description": "Type of the value that the feature key represents",
+                         "examples": [
+                               "string"
+                         ]
+                       },
+                       "value": {
+                         "$id": "#/properties/feature/items/properties/value",
+                         "type": ["boolean", "integer", "string"],
+                         "description": "The value of the verified supported features",
+                         "examples": [
+                               "magnolia"
+                         ]
+                       }
+                 }
+               }
+         },
+         "system": {
+               "$id": "#/properties/system",
+               "type": "array",
+               "title": "The System Schema",
+        "description": "Verified system information",
+               "items": {
+                 "$id": "#/properties/system/items",
+                 "type": "object",
+                 "required": [
+                       "key",
+                       "type",
+                       "value"
+                 ],
+                 "properties": {
+                       "key": {
+                         "$id": "#/properties/system/items/properties/key",
+                         "type": "string",
+                         "description": "System key for getting the system information",
+                         "examples": [
+                               "sound.media.volume.resolution.max"
+                         ]
+                       },
+                       "type": {
+                         "$id": "#/properties/system/items/properties/type",
+                         "type": "string",
+                         "enum" : ["bool", "int", "string"],
+                         "description": "Type of the value that the system key represents",
+                         "examples": [
+                               "int"
+                         ]
+                       },
+                       "value": {
+                         "$id": "#/properties/system/items/properties/value",
+                         "type": ["boolean", "integer", "string"],
+                         "description": "The value of the verified supported features",
+                         "examples": [
+                               40
+                         ]
+                       }
+                 }
+               }
+         }
+       }
+  }