Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/openapi-validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: openapi-validate

on:
pull_request:
paths:
- "static/rest-api.yaml"
- ".github/workflows/openapi-validate.yml"

jobs:
validate-openapi:
name: Validate OpenAPI spec
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Validate OpenAPI spec
run: go run github.com/getkin/kin-openapi/cmd/validate@latest -- static/rest-api.yaml
23 changes: 13 additions & 10 deletions static/rest-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -480,9 +480,10 @@ paths:
value: 2500
summary: If SoC is not available => specify power in Watt
schema:
oneOf:
- $ref: "#/components/parameters/soc"
- $ref: "#/components/parameters/power"
type: number
anyOf:
- $ref: "#/components/schemas/Soc"
- $ref: "#/components/schemas/Power"
- name: type
in: path
required: true
Expand Down Expand Up @@ -563,6 +564,8 @@ paths:
more.](/en/docs/features/vehicle)
tags:
- Loadpoints
parameters:
- $ref: "#/components/parameters/id"
responses:
"200":
$ref: "#/components/responses/EmptyResult"
Expand Down Expand Up @@ -1154,7 +1157,9 @@ components:
minimum: 0
example: 2500
Precondition:
description: Late charging duration in seconds. [Read more.](/en/docs/features/plans#late-charging)
description: >-
Late charging duration in seconds. [Read
more.](/en/docs/features/plans#late-charging)
type: integer
example: 3600
minimum: 0
Expand Down Expand Up @@ -1405,15 +1410,12 @@ components:
in: path
required: true
schema:
oneOf:
- type: boolean
- type: string
- type: number
type: string
enum:
- "true"
- "false"
- 1
- 0
- "1"
- "0"
responses:
NanoSecondsResult:
description: Success - Number result - Unit is **nanoseconds**
Expand Down Expand Up @@ -1500,6 +1502,7 @@ components:
enum:
- Unauthorized
BatteryModeResult:
description: Battery mode.
content:
application/json:
schema:
Expand Down