From 8d05ed2a411bc1a9aa5190d2878bdad3a2d13804 Mon Sep 17 00:00:00 2001 From: esensar Date: Sun, 23 Sep 2018 18:44:32 +0200 Subject: [PATCH] Update recording creation swagger doc --- .../swagger/create_device_recording_spec.yaml | 2 +- app/swagger/template.yaml | 25 +++++++++++++++++-- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/app/api/resources/swagger/create_device_recording_spec.yaml b/app/api/resources/swagger/create_device_recording_spec.yaml index b51ce5b..5d947d4 100644 --- a/app/api/resources/swagger/create_device_recording_spec.yaml +++ b/app/api/resources/swagger/create_device_recording_spec.yaml @@ -13,7 +13,7 @@ parameters: name: body required: true schema: - $ref: '#/definitions/Recording' + $ref: '#/definitions/RecordingCreation' responses: 201: description: Successful creation diff --git a/app/swagger/template.yaml b/app/swagger/template.yaml index 86d1393..fd12457 100644 --- a/app/swagger/template.yaml +++ b/app/swagger/template.yaml @@ -26,6 +26,11 @@ definitions: type: string description: Time + timestamp: + type: integer + description: Time + default: 1537720769 + devicetypename: type: string description: Name of device type @@ -37,7 +42,7 @@ definitions: default: My device devicetype: - type: int + type: integer description: Type of device default: 1 @@ -128,6 +133,22 @@ definitions: description: Value of the recording 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: type: object required: @@ -250,5 +271,5 @@ security: info: description: Python (Flask) backend for IoT sysyem made for master's degree final project title: IoT Backend - version: 0.0.1 + version: 0.1.0 swagger: '2.0'