add description and summary

This commit is contained in:
Wlad 2020-10-22 21:58:34 +02:00
parent 789d00cc79
commit 576d8a34c0
7 changed files with 47 additions and 24 deletions

View File

@ -1,15 +1,20 @@
get:
summary: Printer Connection
operationId: getConnection
description: >-
Retrieve the current connection settings, including information
regarding the available baudrates and serial ports and the current
connection state.
responses:
'200':
description: >-
Retrieve the current connection settings, including information
regarding the available baudrates and serial ports and the current
connection state.
"200":
description: Connection info object
content:
application/json:
schema:
$ref: ../components/schemas/ConnectionInfo.yaml
post:
summary: Change Printer Connection
operationId: setConnectionOptions
requestBody:
required: true
content:
@ -22,9 +27,9 @@ post:
discriminator:
propertyName: command
responses:
'204':
description: success
'400':
"204":
description: Printer connection settings changed
"400":
description: >-
If the selected port or baudrate for a connect command are not part of
the available options.

View File

@ -1,7 +1,10 @@
description: Retrieves information about the current user.
get:
summary: Current User
description: >-
Retrieves information about the current user.
operationId: getCurrentUser
responses:
'200':
"200":
description: Current user object
content:
application/json:

View File

@ -1,4 +1,10 @@
post:
summary: Login
description: >-
Creates a login session or retrieves information about the currently existing session (“passive login”).
Can be used in one of two ways: to login a user via username and password and create a persistent session (usually from a UI in the browser), or to retrieve information about the active user (from an existing session or an API key) via the passive flag.
Will return a 200 OK with a login response on successful login, whether active or passive. The active (username/password) login may also return a 403 Forbidden in case of a username/password mismatch, unknown user or a deactivated account.
operationId: login
requestBody:
required: true
content:
@ -8,11 +14,11 @@ post:
- $ref: ../components/schemas/Login.yaml
- $ref: ../components/schemas/PassiveLogin.yaml
responses:
'200':
"200":
description: Successful login
content:
application/json:
schema:
$ref: ../components/schemas/LoginResponse.yaml
'403':
description: 'Username/password mismatch, unknown user or deactivated account'
"403":
description: "Username/password mismatch, unknown user or deactivated account"

View File

@ -1,5 +1,7 @@
description: Ends the current login session of the current user.
post:
summary: Logout User
description: Ends the current login session of the current user
operationId: logout
responses:
'204':
"204":
description: User logged out

View File

@ -1,4 +1,7 @@
get:
summary: Printer State
description: Retrieves the current state of the printer.
operationId: getPrinterState
responses:
'200':
description: Retrieves the current state of the printer.
"200":
description: Current Printer state.

View File

@ -1,8 +1,10 @@
get:
summary: Printer Tool State
description: >-
Retrieves the current temperature data (actual, target and offset) plus
optionally a (limited) history (actual, target, timestamp) for all of the
printers available tools.
operationId: getToolState
responses:
'200':
"200":
description: Current tool state

View File

@ -1,11 +1,13 @@
description: >-
Retrieve information regarding server and API version. Returns a JSON object
with two keys, api containing the API version, server containing the server
version, text containing the server version including the prefix ``OctoPrint
`` (to determine that this is indeed a genuine OctoPrint instance).
get:
summary: Version
description: >-
Retrieve information regarding server and API version. Returns a JSON object
with two keys, api containing the API version, server containing the server
version, text containing the server version including the prefix ``OctoPrint
`` (to determine that this is indeed a genuine OctoPrint instance).
operationId: getVersion
responses:
'200':
"200":
description: OctoPrint server version
content:
application/json: