File tree Expand file tree Collapse file tree 2 files changed +30
-10
lines changed Expand file tree Collapse file tree 2 files changed +30
-10
lines changed Original file line number Diff line number Diff line change
1
+ name : openapi-validate
2
+
3
+ on :
4
+ pull_request :
5
+ paths :
6
+ - " static/rest-api.yaml"
7
+ - " .github/workflows/openapi-validate.yml"
8
+
9
+ jobs :
10
+ validate-openapi :
11
+ name : Validate OpenAPI spec
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - name : Checkout
15
+ uses : actions/checkout@v4
16
+ - name : Validate OpenAPI spec
17
+ run : go run github.com/getkin/kin-openapi/cmd/validate@latest -- static/rest-api.yaml
Original file line number Diff line number Diff line change @@ -480,9 +480,10 @@ paths:
480
480
value : 2500
481
481
summary : If SoC is not available => specify power in Watt
482
482
schema :
483
- oneOf :
484
- - $ref : " #/components/parameters/soc"
485
- - $ref : " #/components/parameters/power"
483
+ type : number
484
+ anyOf :
485
+ - $ref : " #/components/schemas/Soc"
486
+ - $ref : " #/components/schemas/Power"
486
487
- name : type
487
488
in : path
488
489
required : true
@@ -563,6 +564,8 @@ paths:
563
564
more.](/en/docs/features/vehicle)
564
565
tags :
565
566
- Loadpoints
567
+ parameters :
568
+ - $ref : " #/components/parameters/id"
566
569
responses :
567
570
" 200 " :
568
571
$ref : " #/components/responses/EmptyResult"
@@ -1154,7 +1157,9 @@ components:
1154
1157
minimum : 0
1155
1158
example : 2500
1156
1159
Precondition :
1157
- description : Late charging duration in seconds. [Read more.](/en/docs/features/plans#late-charging)
1160
+ description : >-
1161
+ Late charging duration in seconds. [Read
1162
+ more.](/en/docs/features/plans#late-charging)
1158
1163
type : integer
1159
1164
example : 3600
1160
1165
minimum : 0
@@ -1405,15 +1410,12 @@ components:
1405
1410
in : path
1406
1411
required : true
1407
1412
schema :
1408
- oneOf :
1409
- - type : boolean
1410
- - type : string
1411
- - type : number
1413
+ type : string
1412
1414
enum :
1413
1415
- " true"
1414
1416
- " false"
1415
- - 1
1416
- - 0
1417
+ - " 1 "
1418
+ - " 0 "
1417
1419
responses :
1418
1420
NanoSecondsResult :
1419
1421
description : Success - Number result - Unit is **nanoseconds**
@@ -1500,6 +1502,7 @@ components:
1500
1502
enum :
1501
1503
- Unauthorized
1502
1504
BatteryModeResult :
1505
+ description : Battery mode.
1503
1506
content :
1504
1507
application/json :
1505
1508
schema :
You can’t perform that action at this time.
0 commit comments