From bc76ac86d1995a3e6851101d3bbdba7eae35a17b Mon Sep 17 00:00:00 2001 From: Peter Yefi Date: Fri, 20 Jan 2023 14:01:40 -0500 Subject: [PATCH] Added documentation for energy demand --- hub_api/docs/openapi-specs.yml | 73 +++++++++++++++++++++++++++++++++- 1 file changed, 72 insertions(+), 1 deletion(-) diff --git a/hub_api/docs/openapi-specs.yml b/hub_api/docs/openapi-specs.yml index 73d3dde..0eed27a 100644 --- a/hub_api/docs/openapi-specs.yml +++ b/hub_api/docs/openapi-specs.yml @@ -342,6 +342,59 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiResponse' + /v1.4/energy-demand/{city_id}: + get: + tags: + - energy-demand + summary: Get energy demand + description: Retrieve energy demand data + operationId: getEnergyDemand + parameters: + - in: header + name: appId + schema: + type: string + required: true + description: the Id of the application access this API + - in: path + name: city_id + schema: + type: integer + required: true + description: Numeric ID of the city to get + responses: + '200': + description: Successfully retrieved energy demand data + content: + application/json: + schema: + $ref: '#/components/schemas/EnergyDemand' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + security: + - BearerAuth: [ ] /v1.4/construction/{city_id}: put: tags: @@ -713,7 +766,6 @@ components: items: type: object $ref: '#components/schemas/Layers' - required: - building_names - extra_loses_due_to_thermal_bridges @@ -822,6 +874,25 @@ components: type: array items: type: object + EnergyDemand: + type: object + properties: + heating_demand: + type: array + items: + type: object + cooling_demand: + type: array + items: + type: object + lighting_demand: + type: array + items: + type: object + appliances_demand: + type: array + items: + type: object Login: type: object properties: