Skip to content

Commit 23efa42

Browse files
daranderOrangeTux
authored andcommitted
Implement errata v4 for OCPP 1.6
The OCA has released new versions of the OCPP1.6 schemas together with erratas. This is the latest version published by OCA on 2019-12-05. The schemas have manually modified. The following changes have been made: * Removal of $id fields (not handled by jsonschemas, see commit de93ffe) * Adding Celsius to the enum in StopTransaction.json. This was missed in the schema updates, but is according to the errata. Fixes mobilityhouse#57 Signed-off-by: Anders Darander <[email protected]>
1 parent db8cdb4 commit 23efa42

36 files changed

+659
-586
lines changed

ocpp/v16/schemas/AuthorizeResponse.json

+10-8
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,27 @@
66
"idTagInfo": {
77
"type": "object",
88
"properties": {
9+
"expiryDate": {
10+
"type": "string",
11+
"format": "date-time"
12+
},
13+
"parentIdTag": {
14+
"type": "string",
15+
"maxLength": 20
16+
},
917
"status": {
1018
"type": "string",
19+
"additionalProperties": false,
1120
"enum": [
1221
"Accepted",
1322
"Blocked",
1423
"Expired",
1524
"Invalid",
1625
"ConcurrentTx"
1726
]
18-
},
19-
"expiryDate": {
20-
"type": "string",
21-
"format": "date-time"
22-
},
23-
"parentIdTag": {
24-
"type": "string",
25-
"maxLength": 20
2627
}
2728
},
29+
"additionalProperties": false,
2830
"required": [
2931
"status"
3032
]

ocpp/v16/schemas/BootNotificationResponse.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"properties": {
66
"status": {
77
"type": "string",
8+
"additionalProperties": false,
89
"enum": [
910
"Accepted",
1011
"Pending",
@@ -16,7 +17,7 @@
1617
"format": "date-time"
1718
},
1819
"interval": {
19-
"type": "number"
20+
"type": "integer"
2021
}
2122
},
2223
"additionalProperties": false,

ocpp/v16/schemas/CancelReservationResponse.json

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"properties": {
66
"status": {
77
"type": "string",
8+
"additionalProperties": false,
89
"enum": [
910
"Accepted",
1011
"Rejected"

ocpp/v16/schemas/ChangeAvailability.json

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
},
99
"type": {
1010
"type": "string",
11+
"additionalProperties": false,
1112
"enum": [
1213
"Inoperative",
1314
"Operative"

ocpp/v16/schemas/ChangeAvailabilityResponse.json

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"properties": {
66
"status": {
77
"type": "string",
8+
"additionalProperties": false,
89
"enum": [
910
"Accepted",
1011
"Rejected",

ocpp/v16/schemas/ChangeConfigurationResponse.json

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"properties": {
66
"status": {
77
"type": "string",
8+
"additionalProperties": false,
89
"enum": [
910
"Accepted",
1011
"Rejected",

ocpp/v16/schemas/ClearCacheResponse.json

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"properties": {
66
"status": {
77
"type": "string",
8+
"additionalProperties": false,
89
"enum": [
910
"Accepted",
1011
"Rejected"

ocpp/v16/schemas/ClearChargingProfile.json

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
},
1212
"chargingProfilePurpose": {
1313
"type": "string",
14+
"additionalProperties": false,
1415
"enum": [
1516
"ChargePointMaxProfile",
1617
"TxDefaultProfile",

ocpp/v16/schemas/ClearChargingProfileResponse.json

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"properties": {
66
"status": {
77
"type": "string",
8+
"additionalProperties": false,
89
"enum": [
910
"Accepted",
1011
"Unknown"

ocpp/v16/schemas/DataTransferResponse.json

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"properties": {
66
"status": {
77
"type": "string",
8+
"additionalProperties": false,
89
"enum": [
910
"Accepted",
1011
"Rejected",

ocpp/v16/schemas/DiagnosticsStatusNotification.json

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"properties": {
66
"status": {
77
"type": "string",
8+
"additionalProperties": false,
89
"enum": [
910
"Idle",
1011
"Uploaded",

ocpp/v16/schemas/FirmwareStatusNotification.json

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"properties": {
66
"status": {
77
"type": "string",
8+
"additionalProperties": false,
89
"enum": [
910
"Downloaded",
1011
"DownloadFailed",

ocpp/v16/schemas/GetCompositeSchedule.json

+13-12
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,23 @@
44
"type": "object",
55
"properties": {
66
"connectorId": {
7-
"type": "integer"
7+
"type": "integer"
88
},
9-
"duration": {
10-
"type": "integer"
11-
},
12-
"chargingRateUnit": {
13-
"type": "string",
14-
"enum": [
15-
"A",
16-
"W"
17-
]
18-
}
9+
"duration": {
10+
"type": "integer"
11+
},
12+
"chargingRateUnit": {
13+
"type": "string",
14+
"additionalProperties": false,
15+
"enum": [
16+
"A",
17+
"W"
18+
]
19+
}
1920
},
2021
"additionalProperties": false,
2122
"required": [
2223
"connectorId",
23-
"duration"
24+
"duration"
2425
]
2526
}

ocpp/v16/schemas/GetCompositeScheduleResponse.json

+60-56
Original file line numberDiff line numberDiff line change
@@ -5,68 +5,72 @@
55
"properties": {
66
"status": {
77
"type": "string",
8+
"additionalProperties": false,
89
"enum": [
910
"Accepted",
1011
"Rejected"
1112
]
1213
},
13-
"connectorId": {
14-
"type": "integer"
14+
"connectorId": {
15+
"type": "integer"
1516
},
16-
"scheduleStart": {
17-
"type": "string",
18-
"format": "date-time"
19-
},
20-
"chargingSchedule": {
21-
"type": "object",
22-
"properties": {
23-
"duration": {
24-
"type": "integer"
25-
},
26-
"startSchedule": {
27-
"type": "string",
28-
"format": "date-time"
29-
},
30-
"chargingRateUnit": {
31-
"type": "string",
32-
"enum": [
33-
"A",
34-
"W"
35-
]
36-
},
37-
"chargingSchedulePeriod": {
38-
"type": "array",
39-
"items": {
40-
"type": "object",
41-
"properties": {
42-
"startPeriod": {
43-
"type": "integer"
44-
},
45-
"limit": {
46-
"type": "number",
47-
"multipleOf" : 0.1
48-
},
49-
"numberPhases": {
50-
"type": "integer"
51-
}
52-
},
53-
"required": [
54-
"startPeriod",
55-
"limit"
56-
]
57-
}
58-
},
59-
"minChargingRate": {
60-
"type": "number",
61-
"multipleOf" : 0.1
62-
}
63-
},
64-
"required": [
65-
"chargingRateUnit",
66-
"chargingSchedulePeriod"
67-
]
68-
}
69-
},
17+
"scheduleStart": {
18+
"type": "string",
19+
"format": "date-time"
20+
},
21+
"chargingSchedule": {
22+
"type": "object",
23+
"properties": {
24+
"duration": {
25+
"type": "integer"
26+
},
27+
"startSchedule": {
28+
"type": "string",
29+
"format": "date-time"
30+
},
31+
"chargingRateUnit": {
32+
"type": "string",
33+
"additionalProperties": false,
34+
"enum": [
35+
"A",
36+
"W"
37+
]
38+
},
39+
"chargingSchedulePeriod": {
40+
"type": "array",
41+
"items": {
42+
"type": "object",
43+
"properties": {
44+
"startPeriod": {
45+
"type": "integer"
46+
},
47+
"limit": {
48+
"type": "number",
49+
"multipleOf" : 0.1
50+
},
51+
"numberPhases": {
52+
"type": "integer"
53+
}
54+
},
55+
"additionalProperties": false,
56+
"required": [
57+
"startPeriod",
58+
"limit"
59+
]
60+
}
61+
},
62+
"minChargingRate": {
63+
"type": "number",
64+
"multipleOf" : 0.1
65+
}
66+
},
67+
"additionalProperties": false,
68+
"required": [
69+
"chargingRateUnit",
70+
"chargingSchedulePeriod"
71+
]
72+
}
73+
},
7074
"additionalProperties": false,
7175
"required": [
7276
"status"

ocpp/v16/schemas/GetConfiguration.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"type": "array",
88
"items": {
99
"type": "string",
10-
"maxLength": 50
10+
"maxLength": 50
1111
}
1212
}
1313
},

ocpp/v16/schemas/GetConfigurationResponse.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,17 @@
1010
"properties": {
1111
"key": {
1212
"type": "string",
13-
"maxLength": 50
13+
"maxLength": 50
1414
},
1515
"readonly": {
1616
"type": "boolean"
1717
},
1818
"value": {
1919
"type": "string",
20-
"maxLength": 500
20+
"maxLength": 500
2121
}
2222
},
23+
"additionalProperties": false,
2324
"required": [
2425
"key",
2526
"readonly"
@@ -30,7 +31,7 @@
3031
"type": "array",
3132
"items": {
3233
"type": "string",
33-
"maxLength": 50
34+
"maxLength": 50
3435
}
3536
}
3637
},

0 commit comments

Comments
 (0)