Skip to content

Commit a2263fb

Browse files
authored
Fix energy API documentation (#848)
1 parent 3e52e9f commit a2263fb

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

static/rest-api.yaml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ paths:
279279
responses:
280280
"200":
281281
$ref: "#/components/responses/NumberResult"
282-
/loadpoints/{id}/limitenergy/{power}:
282+
/loadpoints/{id}/limitenergy/{energy}:
283283
post:
284284
summary: Update energy limit
285285
description: >
@@ -290,7 +290,7 @@ paths:
290290
- Loadpoints
291291
parameters:
292292
- $ref: "#/components/parameters/id"
293-
- $ref: "#/components/parameters/power"
293+
- $ref: "#/components/parameters/energy"
294294
responses:
295295
"200":
296296
$ref: "#/components/responses/NumberResult"
@@ -418,7 +418,7 @@ paths:
418418
responses:
419419
"200":
420420
$ref: "#/components/responses/EmptyResult"
421-
/loadpoints/{id}/plan/energy/{power}/{timestamp}:
421+
/loadpoints/{id}/plan/energy/{energy}/{timestamp}:
422422
post:
423423
summary: Sets an energy-based charging plan
424424
description: >
@@ -429,7 +429,7 @@ paths:
429429
- Loadpoints
430430
parameters:
431431
- $ref: "#/components/parameters/id"
432-
- $ref: "#/components/parameters/power"
432+
- $ref: "#/components/parameters/energy"
433433
- $ref: "#/components/parameters/timestamp"
434434
responses:
435435
"200":
@@ -1065,6 +1065,11 @@ components:
10651065
type: number
10661066
example: 16
10671067
minimum: 0
1068+
Energy:
1069+
description: Energy in kWh
1070+
type: number
1071+
example: 25.5
1072+
minimum: 0
10681073
Delay:
10691074
description: >
10701075
Time in seconds. [Read
@@ -1225,7 +1230,7 @@ components:
12251230
type: object
12261231
properties:
12271232
energy:
1228-
$ref: "#/components/schemas/Power"
1233+
$ref: "#/components/schemas/Energy"
12291234
precondition:
12301235
$ref: "#/components/schemas/Precondition"
12311236
time:
@@ -1382,6 +1387,13 @@ components:
13821387
required: true
13831388
schema:
13841389
$ref: "#/components/schemas/Power"
1390+
energy:
1391+
name: energy
1392+
description: Energy in kWh
1393+
in: path
1394+
required: true
1395+
schema:
1396+
$ref: "#/components/schemas/Energy"
13851397
threshold:
13861398
name: threshold
13871399
description: Power in Watts

0 commit comments

Comments
 (0)