-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathswagger.json
1 lines (1 loc) · 2.3 KB
/
swagger.json
1
{"swagger": "2.0", "info": {"title": "flask_app", "description": "", "termsOfService": "", "version": "0.0"}, "paths": {"/bme280": {"post": {"tags": ["measurement"], "description": "Adds a measurement from the BME280 sensor", "parameters": [{"name": "measurement", "description": "Measurement that needs to be added to a csv file and to the database", "in": "body", "schema": {"$ref": "#/definitions/BME280Model"}, "required": true}], "responses": {"201": {"description": "Added measurement", "schema": {"$ref": "#/definitions/BME280Model"}}}}}, "/image": {"post": {"tags": ["image"], "description": "Adds an image", "parameters": [{"name": "image", "description": "Snapshot that needs to be saved as a file", "in": "formData", "type": "file", "required": true}], "responses": {"201": {"description": "Added image"}}}}, "/measurement": {"post": {"tags": ["measurement"], "description": "Adds a measurement from the plant sensor", "parameters": [{"name": "measurement", "description": "Measurement that needs to be added to a csv file and to the database", "in": "body", "schema": {"$ref": "#/definitions/MifloraModel"}, "required": true}], "responses": {"201": {"description": "Added measurement", "schema": {"$ref": "#/definitions/MifloraModel"}}}}}, "/si1145": {"post": {"tags": ["measurement"], "description": "Adds a measurement from the SI1145 sensor", "parameters": [{"name": "measurement", "description": "Measurement that needs to be added to a csv file and to the database", "in": "body", "schema": {"$ref": "#/definitions/SI1145Model"}, "required": true}], "responses": {"201": {"description": "Added measurement", "schema": {"$ref": "#/definitions/SI1145Model"}}}}}}, "definitions": {"MifloraModel": {"type": "object", "properties": {"device": {"type": "string"}, "timestamp": {"type": "string"}, "moisture": {"type": "number"}, "temperature": {"type": "number"}, "conductivity": {"type": "number"}, "light": {"type": "number"}}}, "BME280Model": {"type": "object", "properties": {"device": {"type": "string"}, "timestamp": {"type": "string"}, "temperature": {"type": "number"}, "pressure": {"type": "number"}, "humidity": {"type": "number"}}}, "SI1145Model": {"type": "object", "properties": {"device": {"type": "string"}, "timestamp": {"type": "string"}, "visible": {"type": "number"}, "IR": {"type": "number"}, "UV": {"type": "number"}}}}}