SEBRAUC/openapi.yml
Theta-Dev 51eb9c0cac
All checks were successful
continuous-integration/drone/push Build is passing
finished uploader component
2021-11-21 01:31:38 +01:00

107 lines
2.7 KiB
YAML

openapi: "3.0.3"
info:
title: SEBRAUC
version: "0.0.1"
servers:
- url: http://localhost:8080/api
paths:
/status:
get:
responses:
"200":
description: OK
content:
"application/json":
schema:
$ref: "#/components/schemas/RaucStatus"
default:
description: "Server error"
content:
"application/json":
schema:
$ref: "#/components/schemas/StatusMessage"
/update:
post:
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
updateFile:
type: string
format: binary
responses:
"200":
description: "OK"
content:
"application/json":
schema:
$ref: "#/components/schemas/StatusMessage"
default:
description: "Server error"
content:
"application/json":
schema:
$ref: "#/components/schemas/StatusMessage"
/reboot:
post:
responses:
"200":
description: "OK"
content:
"application/json":
schema:
$ref: "#/components/schemas/StatusMessage"
default:
description: "Server error"
content:
"application/json":
schema:
$ref: "#/components/schemas/StatusMessage"
components:
schemas:
RaucStatus:
type: object
properties:
installing:
description: "True if the installer is running"
type: boolean
percent:
description: "Installation progress"
type: integer
minimum: 0
maximum: 100
message:
description: "Current installation step"
type: string
example: "Copying image to rootfs.0"
last_error:
description: "Installation error message"
type: string
example: "Failed to check bundle identifier: Invalid identifier. Did you pass a valid RAUC bundle?"
log:
description: "Full command line output of the current installation"
type: string
example: "0% Installing\n0% Determining slot states\n20% Determining slot states done.\n"
required:
- installing
- percent
- message
- last_error
- log
StatusMessage:
type: object
properties:
success:
description: "Is operation successful"
type: boolean
msg:
description: "Success message"
type: string
example: "Update started"
required:
- msg