Update recording creation swagger doc

master
esensar 2018-09-23 18:44:32 +02:00
parent 758b12621a
commit 8d05ed2a41
2 changed files with 24 additions and 3 deletions

View File

@ -13,7 +13,7 @@ parameters:
name: body name: body
required: true required: true
schema: schema:
$ref: '#/definitions/Recording' $ref: '#/definitions/RecordingCreation'
responses: responses:
201: 201:
description: Successful creation description: Successful creation

View File

@ -26,6 +26,11 @@ definitions:
type: string type: string
description: Time description: Time
timestamp:
type: integer
description: Time
default: 1537720769
devicetypename: devicetypename:
type: string type: string
description: Name of device type description: Name of device type
@ -37,7 +42,7 @@ definitions:
default: My device default: My device
devicetype: devicetype:
type: int type: integer
description: Type of device description: Type of device
default: 1 default: 1
@ -128,6 +133,22 @@ definitions:
description: Value of the recording description: Value of the recording
default: '25 degrees' default: '25 degrees'
RecordingCreation:
type: object
required:
- recorded_at
- record_type
- record_value
properties:
recorded_at:
$ref: '#/definitions/timestamp'
record_type:
$ref: '#/definitions/id'
record_value:
type: string
description: Value of the recording
default: '25 degrees'
DeviceType: DeviceType:
type: object type: object
required: required:
@ -250,5 +271,5 @@ security:
info: info:
description: Python (Flask) backend for IoT sysyem made for master's degree final project description: Python (Flask) backend for IoT sysyem made for master's degree final project
title: IoT Backend title: IoT Backend
version: 0.0.1 version: 0.1.0
swagger: '2.0' swagger: '2.0'