Files
sensor-web-v2/server-python/openapi.json
Marco Crapts cd3afa4d61
Some checks failed
continuous-integration/drone/push Build is failing
add Python server backend
2024-05-11 14:06:39 +02:00

82 lines
2.7 KiB
JSON

{
"openapi": "3.1.0",
"info": { "title": "FastAPI", "version": "0.1.0" },
"paths": {
"/type/{type}/startDate/{start_date}/endDate/{end_date}/sample/{sample}": {
"get": {
"tags": ["Retrieve sensor data"],
"summary": "Get Sensor Data",
"operationId": "get_sensor_data_type__type__startDate__start_date__endDate__end_date__sample__sample__get",
"parameters": [
{
"name": "type",
"in": "path",
"required": true,
"schema": { "enum": ["temperature", "humidity"], "type": "string", "title": "Type" }
},
{
"name": "start_date",
"in": "path",
"required": true,
"schema": { "type": "integer", "title": "Start Date" }
},
{ "name": "end_date", "in": "path", "required": true, "schema": { "type": "integer", "title": "End Date" } },
{ "name": "sample", "in": "path", "required": true, "schema": { "type": "integer", "title": "Sample" } }
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": { "$ref": "#/components/schemas/Document" },
"title": "Response Get Sensor Data Type Type Startdate Start Date Enddate End Date Sample Sample Get"
}
}
}
},
"422": {
"description": "Validation Error",
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }
}
}
}
}
},
"components": {
"schemas": {
"Document": {
"properties": {
"date": { "type": "integer", "title": "Date" },
"value": { "type": "number", "title": "Value" }
},
"type": "object",
"required": ["date", "value"],
"title": "Document"
},
"HTTPValidationError": {
"properties": {
"detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "type": "array", "title": "Detail" }
},
"type": "object",
"title": "HTTPValidationError"
},
"ValidationError": {
"properties": {
"loc": {
"items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] },
"type": "array",
"title": "Location"
},
"msg": { "type": "string", "title": "Message" },
"type": { "type": "string", "title": "Error Type" }
},
"type": "object",
"required": ["loc", "msg", "type"],
"title": "ValidationError"
}
}
}
}