--- /dev/null
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "urn:OCPP:1.6:2019:12:CancelReservationRequest",
+ "title": "CancelReservationRequest",
+ "type": "object",
+ "properties": {
+ "reservationId": {
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false,
+ "required": ["reservationId"]
+}
--- /dev/null
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "urn:OCPP:1.6:2019:12:CancelReservationResponse",
+ "title": "CancelReservationResponse",
+ "type": "object",
+ "properties": {
+ "status": {
+ "type": "string",
+ "additionalProperties": false,
+ "enum": ["Accepted", "Rejected"]
+ }
+ },
+ "additionalProperties": false,
+ "required": ["status"]
+}
--- /dev/null
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "urn:OCPP:1.6:2019:12:ChangeAvailabilityResponse",
+ "title": "ChangeAvailabilityResponse",
+ "type": "object",
+ "properties": {
+ "status": {
+ "type": "string",
+ "additionalProperties": false,
+ "enum": ["Accepted", "Rejected", "Scheduled"]
+ }
+ },
+ "additionalProperties": false,
+ "required": ["status"]
+}
--- /dev/null
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "urn:OCPP:1.6:2019:12:ChangeConfigurationResponse",
+ "title": "ChangeConfigurationResponse",
+ "type": "object",
+ "properties": {
+ "status": {
+ "type": "string",
+ "additionalProperties": false,
+ "enum": ["Accepted", "Rejected", "RebootRequired", "NotSupported"]
+ }
+ },
+ "additionalProperties": false,
+ "required": ["status"]
+}
--- /dev/null
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "urn:OCPP:1.6:2019:12:ClearCacheResponse",
+ "title": "ClearCacheResponse",
+ "type": "object",
+ "properties": {
+ "status": {
+ "type": "string",
+ "additionalProperties": false,
+ "enum": ["Accepted", "Rejected"]
+ }
+ },
+ "additionalProperties": false,
+ "required": ["status"]
+}
--- /dev/null
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "urn:OCPP:1.6:2019:12:ClearChargingProfileResponse",
+ "title": "ClearChargingProfileResponse",
+ "type": "object",
+ "properties": {
+ "status": {
+ "type": "string",
+ "additionalProperties": false,
+ "enum": ["Accepted", "Unknown"]
+ }
+ },
+ "additionalProperties": false,
+ "required": ["status"]
+}
--- /dev/null
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "urn:OCPP:1.6:2019:12:GetConfigurationResponse",
+ "title": "GetConfigurationResponse",
+ "type": "object",
+ "properties": {
+ "configurationKey": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "key": {
+ "type": "string",
+ "maxLength": 50
+ },
+ "readonly": {
+ "type": "boolean"
+ },
+ "value": {
+ "type": "string",
+ "maxLength": 500
+ }
+ },
+ "additionalProperties": false,
+ "required": ["key", "readonly"]
+ }
+ },
+ "unknownKey": {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "maxLength": 50
+ }
+ }
+ },
+ "additionalProperties": false
+}
--- /dev/null
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "urn:OCPP:1.6:2019:12:GetDiagnosticsResponse",
+ "title": "GetDiagnosticsResponse",
+ "type": "object",
+ "properties": {
+ "fileName": {
+ "type": "string",
+ "maxLength": 255
+ }
+ },
+ "additionalProperties": false
+}
--- /dev/null
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "urn:OCPP:1.6:2019:12:GetLocalListVersionRequest",
+ "title": "GetLocalListVersionRequest",
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+}
--- /dev/null
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "urn:OCPP:1.6:2019:12:GetLocalListVersionResponse",
+ "title": "GetLocalListVersionResponse",
+ "type": "object",
+ "properties": {
+ "listVersion": {
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false,
+ "required": ["listVersion"]
+}
--- /dev/null
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "urn:OCPP:1.6:2019:12:RemoteStartTransactionResponse",
+ "title": "RemoteStartTransactionResponse",
+ "type": "object",
+ "properties": {
+ "status": {
+ "type": "string",
+ "additionalProperties": false,
+ "enum": ["Accepted", "Rejected"]
+ }
+ },
+ "additionalProperties": false,
+ "required": ["status"]
+}
--- /dev/null
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "urn:OCPP:1.6:2019:12:RemoteStopTransactionResponse",
+ "title": "RemoteStopTransactionResponse",
+ "type": "object",
+ "properties": {
+ "status": {
+ "type": "string",
+ "additionalProperties": false,
+ "enum": ["Accepted", "Rejected"]
+ }
+ },
+ "additionalProperties": false,
+ "required": ["status"]
+}
--- /dev/null
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "urn:OCPP:1.6:2019:12:ReserveNowRequest",
+ "title": "ReserveNowRequest",
+ "type": "object",
+ "properties": {
+ "connectorId": {
+ "type": "integer"
+ },
+ "expiryDate": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "idTag": {
+ "type": "string",
+ "maxLength": 20
+ },
+ "parentIdTag": {
+ "type": "string",
+ "maxLength": 20
+ },
+ "reservationId": {
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false,
+ "required": ["connectorId", "expiryDate", "idTag", "reservationId"]
+}
--- /dev/null
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "urn:OCPP:1.6:2019:12:ReserveNowResponse",
+ "title": "ReserveNowResponse",
+ "type": "object",
+ "properties": {
+ "status": {
+ "type": "string",
+ "additionalProperties": false,
+ "enum": ["Accepted", "Faulted", "Occupied", "Rejected", "Unavailable"]
+ }
+ },
+ "additionalProperties": false,
+ "required": ["status"]
+}
--- /dev/null
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "urn:OCPP:1.6:2019:12:ResetResponse",
+ "title": "ResetResponse",
+ "type": "object",
+ "properties": {
+ "status": {
+ "type": "string",
+ "additionalProperties": false,
+ "enum": ["Accepted", "Rejected"]
+ }
+ },
+ "additionalProperties": false,
+ "required": ["status"]
+}
--- /dev/null
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "urn:OCPP:1.6:2019:12:SendLocalListRequest",
+ "title": "SendLocalListRequest",
+ "type": "object",
+ "properties": {
+ "listVersion": {
+ "type": "integer"
+ },
+ "localAuthorizationList": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "idTag": {
+ "type": "string",
+ "maxLength": 20
+ },
+ "idTagInfo": {
+ "type": "object",
+ "properties": {
+ "expiryDate": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "parentIdTag": {
+ "type": "string",
+ "maxLength": 20
+ },
+ "status": {
+ "type": "string",
+ "additionalProperties": false,
+ "enum": ["Accepted", "Blocked", "Expired", "Invalid", "ConcurrentTx"]
+ }
+ },
+ "additionalProperties": false,
+ "required": ["status"]
+ }
+ },
+ "additionalProperties": false,
+ "required": ["idTag"]
+ }
+ },
+ "updateType": {
+ "type": "string",
+ "additionalProperties": false,
+ "enum": ["Differential", "Full"]
+ }
+ },
+ "additionalProperties": false,
+ "required": ["listVersion", "updateType"]
+}
--- /dev/null
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "urn:OCPP:1.6:2019:12:SendLocalListResponse",
+ "title": "SendLocalListResponse",
+ "type": "object",
+ "properties": {
+ "status": {
+ "type": "string",
+ "additionalProperties": false,
+ "enum": ["Accepted", "Failed", "NotSupported", "VersionMismatch"]
+ }
+ },
+ "additionalProperties": false,
+ "required": ["status"]
+}
--- /dev/null
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "urn:OCPP:1.6:2019:12:SetChargingProfileResponse",
+ "title": "SetChargingProfileResponse",
+ "type": "object",
+ "properties": {
+ "status": {
+ "type": "string",
+ "additionalProperties": false,
+ "enum": ["Accepted", "Rejected", "NotSupported"]
+ }
+ },
+ "additionalProperties": false,
+ "required": ["status"]
+}
--- /dev/null
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "urn:OCPP:1.6:2019:12:TriggerMessageResponse",
+ "title": "TriggerMessageResponse",
+ "type": "object",
+ "properties": {
+ "status": {
+ "type": "string",
+ "additionalProperties": false,
+ "enum": ["Accepted", "Rejected", "NotImplemented"]
+ }
+ },
+ "additionalProperties": false,
+ "required": ["status"]
+}
--- /dev/null
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "urn:OCPP:1.6:2019:12:UnlockConnectorResponse",
+ "title": "UnlockConnectorResponse",
+ "type": "object",
+ "properties": {
+ "status": {
+ "type": "string",
+ "additionalProperties": false,
+ "enum": ["Unlocked", "UnlockFailed", "NotSupported"]
+ }
+ },
+ "additionalProperties": false,
+ "required": ["status"]
+}
--- /dev/null
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "urn:OCPP:1.6:2019:12:UpdateFirmwareRequest",
+ "title": "UpdateFirmwareRequest",
+ "type": "object",
+ "properties": {
+ "location": {
+ "type": "string",
+ "format": "uri"
+ },
+ "retries": {
+ "type": "integer"
+ },
+ "retrieveDate": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "retryInterval": {
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false,
+ "required": ["location", "retrieveDate"]
+}
--- /dev/null
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "urn:OCPP:1.6:2019:12:UpdateFirmwareResponse",
+ "title": "UpdateFirmwareResponse",
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+}
)
) as JSONSchemaType<OCPP16DataTransferRequest>,
],
+ [
+ OCPP16IncomingRequestCommand.UPDATE_FIRMWARE,
+ JSON.parse(
+ fs.readFileSync(
+ path.resolve(
+ path.dirname(fileURLToPath(import.meta.url)),
+ '../../../assets/json-schemas/ocpp/1.6/UpdateFirmware.json'
+ ),
+ 'utf8'
+ )
+ ) as JSONSchemaType<OCPP16UpdateFirmwareRequest>,
+ ],
]);
this.validatePayload.bind(this);
}