From b3bb3408025c3a36790d3245696da0d72e0b8c73 Mon Sep 17 00:00:00 2001 From: JunsongDu Date: Tue, 17 Oct 2023 11:41:27 +0200 Subject: [PATCH] chore: initial commit --- Sensor.json | 35 +++++++++++++++++++++++++++++++++++ TemperatureSensor.json | 31 +++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 Sensor.json create mode 100644 TemperatureSensor.json diff --git a/Sensor.json b/Sensor.json new file mode 100644 index 0000000..ac54862 --- /dev/null +++ b/Sensor.json @@ -0,0 +1,35 @@ +{ + "$schema": "http://json-schema.org/schema#", + "$schemaVersion": "0.0.3", + "$id": "https://TODO/Sensor.json", + "description": "This entity captures the static properties of common iot sensor", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "Device" + ] + }, + "id": { + "type": "string" + }, + "documentation": { + "type": "string", + "format": "uri", + "description": "A link to documentation." + }, + "modelName": { + "type": "string", + "description": "Sensor's model name." + }, + "manufacturer": { + "type": "string", + "description": "Sensor's manufacturer name." + } + }, + "required": [ + "id", + "type" + ] +} \ No newline at end of file diff --git a/TemperatureSensor.json b/TemperatureSensor.json new file mode 100644 index 0000000..6b78029 --- /dev/null +++ b/TemperatureSensor.json @@ -0,0 +1,31 @@ +{ + "$schema": "http://json-schema.org/schema#", + "$schemaVersion": "0.0.3", + "$id": "http://TODO/TemperatureSensor.json", + "description": "This entity captures the static properties of common iot sensor", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Sensor" + }, + { + "properties": { + "type": { + "type": "string", + "enum": [ + "TemperatureSensor" + ] + }, + "temperature": { + "type": "number" + } + }, + "required": [ + "temperature" + ] + } + ], + "definitions": { + "Sensor": "https://ToDO/Sensor.json" + } +} \ No newline at end of file