Add swagger docs for device documentation route
parent
5b35d17f59
commit
af5aa5e092
|
@ -45,7 +45,7 @@ class RecordingsQuerySchema(Schema):
|
|||
orders = fields.Raw()
|
||||
|
||||
|
||||
class DeviceDocumentationSchema(BaseResourceSchema):
|
||||
class DeviceDocumentationSchema(BaseTimestampedResourceSchema):
|
||||
device_id = fields.Integer(dump_only=True)
|
||||
text = fields.String(required=True)
|
||||
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
Gets a device documentation
|
||||
---
|
||||
tags:
|
||||
- Device
|
||||
- Docs
|
||||
parameters:
|
||||
- in: path
|
||||
name: device_id
|
||||
required: true
|
||||
type: integer
|
||||
description: Id of the device
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
$ref: '#/definitions/DeviceDocumentation'
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
Updates a device documentation
|
||||
---
|
||||
tags:
|
||||
- Device
|
||||
- Docs
|
||||
parameters:
|
||||
- in: path
|
||||
name: device_id
|
||||
required: true
|
||||
type: integer
|
||||
description: Id of the device
|
||||
- in: body
|
||||
name: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/DeviceDocumentation'
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- content
|
||||
properties:
|
||||
content:
|
||||
$ref: '#/definitions/DeviceDocumentation'
|
|
@ -233,6 +233,25 @@ definitions:
|
|||
modified_at:
|
||||
$ref: '#/definitions/datetime'
|
||||
|
||||
DeviceDocumentation:
|
||||
type: object
|
||||
required:
|
||||
- device_id
|
||||
- text
|
||||
- created_at
|
||||
- modified_at
|
||||
properties:
|
||||
device_id:
|
||||
$ref: '#/definitions/id'
|
||||
text:
|
||||
type: string
|
||||
description: Text of documentation
|
||||
example: This device is used for ...
|
||||
created_at:
|
||||
$ref: '#/definitions/datetime'
|
||||
modified_at:
|
||||
$ref: '#/definitions/datetime'
|
||||
|
||||
DeviceShareTokenCreation:
|
||||
type: object
|
||||
required:
|
||||
|
|
Loading…
Reference in New Issue