Skip to content

Rest API: remove result key #842

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
129 changes: 36 additions & 93 deletions static/rest-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -352,10 +352,7 @@ paths:
content:
application/json:
schema:
type: object
properties:
result:
$ref: "#/components/schemas/Mode"
$ref: "#/components/schemas/Mode"
/loadpoints/{id}/phases/{phases}:
post:
summary: Update allowed phases
Expand Down Expand Up @@ -394,17 +391,14 @@ paths:
content:
application/json:
schema:
type: object
properties:
result:
allOf:
- type: object
properties:
planId:
$ref: "#/components/schemas/Id"
precondition:
$ref: "#/components/schemas/Precondition"
- $ref: "#/components/schemas/PlanRates"
allOf:
- type: object
properties:
planId:
$ref: "#/components/schemas/Id"
precondition:
$ref: "#/components/schemas/Precondition"
- $ref: "#/components/schemas/PlanRates"
/loadpoints/{id}/plan/energy:
delete:
summary: Deletes the energy-based charging plan
Expand Down Expand Up @@ -437,10 +431,7 @@ paths:
content:
application/json:
schema:
type: object
properties:
result:
$ref: "#/components/schemas/StaticEnergyPlan"
$ref: "#/components/schemas/StaticEnergyPlan"
/loadpoints/{id}/plan/repeating/preview/{soc}/{weekdays}/{hourMinuteTime}/{timezone}:
get:
summary: Repeating plan preview
Expand Down Expand Up @@ -588,11 +579,8 @@ paths:
schema:
type: object
properties:
result:
type: object
properties:
vehicle:
$ref: "#/components/schemas/VehicleTitle"
vehicle:
$ref: "#/components/schemas/VehicleTitle"
/prioritysoc/{soc}:
post:
summary: Set battery priority SoC
Expand Down Expand Up @@ -693,10 +681,7 @@ paths:
content:
application/json:
schema:
type: object
properties:
result:
$ref: "#/components/schemas/ChargingSessions"
$ref: "#/components/schemas/ChargingSessions"
text/csv:
schema:
description: Download csv-file
Expand Down Expand Up @@ -782,10 +767,7 @@ paths:
content:
application/json:
schema:
type: object
properties:
result:
$ref: "#/components/schemas/State"
$ref: "#/components/schemas/State"
/system/log:
get:
summary: Logs
Expand Down Expand Up @@ -818,12 +800,9 @@ paths:
content:
application/json:
schema:
type: object
properties:
result:
type: array
items:
type: string
type: array
items:
type: string
text/plain:
schema:
description: Download txt-file
Expand All @@ -846,10 +825,7 @@ paths:
content:
application/json:
schema:
type: object
properties:
result:
$ref: "#/components/schemas/LogAreas"
$ref: "#/components/schemas/LogAreas"
"401":
$ref: "#/components/responses/Unauthorized"
/system/shutdown:
Expand Down Expand Up @@ -897,11 +873,8 @@ paths:
schema:
type: object
properties:
result:
type: object
properties:
rates:
$ref: "#/components/schemas/Rates"
rates:
$ref: "#/components/schemas/Rates"
"404":
description: Tariff not defined
/vehicles/{name}/limitsoc/{soc}:
Expand Down Expand Up @@ -954,10 +927,7 @@ paths:
content:
application/json:
schema:
type: object
properties:
result:
$ref: "#/components/schemas/RepeatingPlans"
$ref: "#/components/schemas/RepeatingPlans"
/vehicles/{name}/plan/soc:
delete:
summary: Delete a SoC-based charging plan
Expand Down Expand Up @@ -992,10 +962,7 @@ paths:
content:
application/json:
schema:
type: object
properties:
result:
$ref: "#/components/schemas/StaticSocPlan"
$ref: "#/components/schemas/StaticSocPlan"
components:
schemas:
BatteryMode:
Expand Down Expand Up @@ -1423,69 +1390,48 @@ components:
content:
application/json:
schema:
type: object
properties:
result:
type: integer
type: integer
NumberResult:
description: Success - Number result
content:
application/json:
schema:
type: object
properties:
result:
type: number
type: number
IntegerResult:
description: Success - Integer result
content:
application/json:
schema:
type: object
properties:
result:
type: integer
type: integer
SocResult:
description: Success - Soc result
content:
application/json:
schema:
type: object
properties:
result:
type: object
properties:
soc:
$ref: "#/components/schemas/Soc"
soc:
$ref: "#/components/schemas/Soc"
PlanRatesResult:
description: Success - PlanRates result
content:
application/json:
schema:
type: object
properties:
result:
$ref: "#/components/schemas/PlanRates"
$ref: "#/components/schemas/PlanRates"
BooleanResult:
description: Success - Boolean result
content:
application/json:
schema:
type: object
properties:
result:
type: boolean
type: boolean
NullResult:
description: Success - Null result
content:
application/json:
schema:
description: Value is always null
type: object
properties:
result:
description: Value is always null
type: object
nullable: true
nullable: true
BlankResponse:
description: Success - Blank response
EmptyResult:
Expand All @@ -1507,14 +1453,11 @@ components:
content:
application/json:
schema:
type: object
properties:
result:
type: integer
description: |
Battery mode. 0: unknown, 1: normal, 2: hold, 3: charge
minimum: 0
maximum: 3
type: integer
description: |
Battery mode. 0: unknown, 1: normal, 2: hold, 3: charge
minimum: 0
maximum: 3
securitySchemes:
cookieAuth:
type: apiKey
Expand Down