Add missing OCPP 1.6 command payload JSON schemas
authorJérôme Benoit <jerome.benoit@sap.com>
Thu, 5 Jan 2023 21:27:02 +0000 (22:27 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Thu, 5 Jan 2023 21:27:02 +0000 (22:27 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/assets/json-schemas/ocpp/1.6/FirmwareStatusNotification.json [new file with mode: 0755]
src/assets/json-schemas/ocpp/1.6/FirmwareStatusNotificationResponse.json [new file with mode: 0755]
src/assets/json-schemas/ocpp/1.6/GetCompositeScheduleResponse.json [new file with mode: 0755]

diff --git a/src/assets/json-schemas/ocpp/1.6/FirmwareStatusNotification.json b/src/assets/json-schemas/ocpp/1.6/FirmwareStatusNotification.json
new file mode 100755 (executable)
index 0000000..2d6abbe
--- /dev/null
@@ -0,0 +1,23 @@
+{
+  "$schema": "http://json-schema.org/draft-07/schema",
+  "$id": "urn:OCPP:1.6:2019:12:FirmwareStatusNotificationRequest",
+  "title": "FirmwareStatusNotificationRequest",
+  "type": "object",
+  "properties": {
+    "status": {
+      "type": "string",
+      "additionalProperties": false,
+      "enum": [
+        "Downloaded",
+        "DownloadFailed",
+        "Downloading",
+        "Idle",
+        "InstallationFailed",
+        "Installing",
+        "Installed"
+      ]
+    }
+  },
+  "additionalProperties": false,
+  "required": ["status"]
+}
diff --git a/src/assets/json-schemas/ocpp/1.6/FirmwareStatusNotificationResponse.json b/src/assets/json-schemas/ocpp/1.6/FirmwareStatusNotificationResponse.json
new file mode 100755 (executable)
index 0000000..8e8012a
--- /dev/null
@@ -0,0 +1,8 @@
+{
+  "$schema": "http://json-schema.org/draft-07/schema",
+  "$id": "urn:OCPP:1.6:2019:12:FirmwareStatusNotificationResponse",
+  "title": "FirmwareStatusNotificationResponse",
+  "type": "object",
+  "properties": {},
+  "additionalProperties": false
+}
diff --git a/src/assets/json-schemas/ocpp/1.6/GetCompositeScheduleResponse.json b/src/assets/json-schemas/ocpp/1.6/GetCompositeScheduleResponse.json
new file mode 100755 (executable)
index 0000000..3e6415c
--- /dev/null
@@ -0,0 +1,65 @@
+{
+  "$schema": "http://json-schema.org/draft-07/schema",
+  "$id": "urn:OCPP:1.6:2019:12:GetCompositeScheduleResponse",
+  "title": "GetCompositeScheduleResponse",
+  "type": "object",
+  "properties": {
+    "status": {
+      "type": "string",
+      "additionalProperties": false,
+      "enum": ["Accepted", "Rejected"]
+    },
+    "connectorId": {
+      "type": "integer"
+    },
+    "scheduleStart": {
+      "type": "string",
+      "format": "date-time"
+    },
+    "chargingSchedule": {
+      "type": "object",
+      "properties": {
+        "duration": {
+          "type": "integer"
+        },
+        "startSchedule": {
+          "type": "string",
+          "format": "date-time"
+        },
+        "chargingRateUnit": {
+          "type": "string",
+          "additionalProperties": false,
+          "enum": ["A", "W"]
+        },
+        "chargingSchedulePeriod": {
+          "type": "array",
+          "items": {
+            "type": "object",
+            "properties": {
+              "startPeriod": {
+                "type": "integer"
+              },
+              "limit": {
+                "type": "number",
+                "multipleOf": 0.1
+              },
+              "numberPhases": {
+                "type": "integer"
+              }
+            },
+            "additionalProperties": false,
+            "required": ["startPeriod", "limit"]
+          }
+        },
+        "minChargingRate": {
+          "type": "number",
+          "multipleOf": 0.1
+        }
+      },
+      "additionalProperties": false,
+      "required": ["chargingRateUnit", "chargingSchedulePeriod"]
+    }
+  },
+  "additionalProperties": false,
+  "required": ["status"]
+}