// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // This file was generated by swaggo/swag at // 2020-03-06 15:07:22.664243647 +0100 CET m=+0.093312600 package docs import ( "bytes" "encoding/json" "github.com/alecthomas/template" "github.com/swaggo/swag" ) var doc = `{ "schemes": {{ marshal .Schemes }}, "swagger": "2.0", "info": { "description": "This is the VILLASweb Backend API v2.0.\nParts of this API are still in development. Please check the [VILLASweb-backend-go repository](https://git.rwth-aachen.de/acs/public/villas/web-backend-go) for more information.\nThis documentation is auto-generated based on the API documentation in the code. The tool [swag](https://github.com/swaggo/swag) is used to auto-generate API docs for the [gin-gonic](https://github.com/gin-gonic/gin) framework.", "title": "VILLASweb Backend API", "contact": { "name": "Sonja Happ", "email": "sonja.happ@eonerc.rwth-aachen.de" }, "license": { "name": "GNU GPL 3.0", "url": "http://www.gnu.de/documents/gpl-3.0.en.html" }, "version": "2.0" }, "host": "{{.Host}}", "basePath": "/api/v2", "paths": { "/authenticate": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "authentication" ], "summary": "Authentication for user", "operationId": "authenticate", "parameters": [ { "description": "loginRequest of user", "name": "inputUser", "in": "body", "required": true, "schema": { "type": "object", "$ref": "#/definitions/user.loginRequest" } } ], "responses": { "200": { "description": "JSON web token, success status, message and authenticated user object", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseAuthenticate" } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error.", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } } }, "/configs": { "get": { "produces": [ "application/json" ], "tags": [ "component-configurations" ], "summary": "Get all component configurations of scenario", "operationId": "getConfigs", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "Scenario ID", "name": "scenarioID", "in": "query", "required": true } ], "responses": { "200": { "description": "Component configurations which belong to scenario", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseConfigs" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "component-configurations" ], "summary": "Add a component configuration to a scenario", "operationId": "addConfig", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "description": "component configuration to be added incl. IDs of scenario and IC", "name": "inputConfig", "in": "body", "required": true, "schema": { "type": "object", "$ref": "#/definitions/component_configuration.addConfigRequest" } } ], "responses": { "200": { "description": "Component configuration that was added", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseConfig" } }, "400": { "description": "Bad request", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } } }, "/configs/{configID}": { "get": { "produces": [ "application/json" ], "tags": [ "component-configurations" ], "summary": "Get a component configuration", "operationId": "getConfig", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "Config ID", "name": "configID", "in": "path", "required": true } ], "responses": { "200": { "description": "component configuration that was requested", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseConfig" } }, "400": { "description": "Bad request", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "component-configurations" ], "summary": "Update a component configuration", "operationId": "updateConfig", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "description": "component configuration to be updated", "name": "inputConfig", "in": "body", "required": true, "schema": { "type": "object", "$ref": "#/definitions/component_configuration.updateConfigRequest" } }, { "type": "integer", "description": "Config ID", "name": "configID", "in": "path", "required": true } ], "responses": { "200": { "description": "Component configuration that was added", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseConfig" } }, "400": { "description": "Bad request", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "component-configurations" ], "summary": "Delete a component configuration", "operationId": "deleteConfig", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "Config ID", "name": "configID", "in": "path", "required": true } ], "responses": { "200": { "description": "component configuration that was deleted", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseConfig" } }, "400": { "description": "Bad request", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } } }, "/dashboards": { "get": { "produces": [ "application/json" ], "tags": [ "dashboards" ], "summary": "Get all dashboards of scenario", "operationId": "getDashboards", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "Scenario ID", "name": "scenarioID", "in": "query", "required": true } ], "responses": { "200": { "description": "Dashboards which belong to scenario", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseDashboards" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "dashboards" ], "summary": "Add a dashboard to a scenario", "operationId": "addDashboard", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "description": "Dashboard to be added incl. ID of Scenario", "name": "inputDab", "in": "body", "required": true, "schema": { "type": "object", "$ref": "#/definitions/dashboard.addDashboardRequest" } } ], "responses": { "200": { "description": "Dashboard that was added", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseDashboard" } }, "400": { "description": "Bad request", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } } }, "/dashboards/{dashboardID}": { "get": { "produces": [ "application/json" ], "tags": [ "dashboards" ], "summary": "Get a dashboard", "operationId": "getDashboard", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "Dashboard ID", "name": "dashboardID", "in": "path", "required": true } ], "responses": { "200": { "description": "Dashboard that was requested", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseDashboard" } }, "400": { "description": "Bad request", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "dashboards" ], "summary": "Update a dashboard", "operationId": "updateDashboard", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "description": "Dashboard to be updated", "name": "inputDab", "in": "body", "required": true, "schema": { "type": "object", "$ref": "#/definitions/dashboard.updateDashboardRequest" } }, { "type": "integer", "description": "Dashboard ID", "name": "dashboardID", "in": "path", "required": true } ], "responses": { "200": { "description": "Dashboard that was updated", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseDashboard" } }, "400": { "description": "Bad request", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "dashboards" ], "summary": "Delete a dashboard", "operationId": "deleteDashboard", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "Dashboard ID", "name": "dashboardID", "in": "path", "required": true } ], "responses": { "200": { "description": "Dashboard that was deleted", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseDashboard" } }, "400": { "description": "Bad request", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } } }, "/files": { "get": { "produces": [ "application/json" ], "tags": [ "files" ], "summary": "Get all files of a specific component configuration or widget", "operationId": "getFiles", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "type": "string", "description": "Set to config for files of component configuration, set to widget for files of widget", "name": "objectType", "in": "query", "required": true }, { "type": "integer", "description": "ID of either config or widget of which files are requested", "name": "objectID", "in": "query", "required": true } ], "responses": { "200": { "description": "Files which belong to config or widget", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseFiles" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } }, "post": { "consumes": [ "text/plain", "image/png", "image/jpeg", "image/gif", "model/x-cim", "model/x-cim.zip" ], "produces": [ "application/json" ], "tags": [ "files" ], "summary": "Add a file to a specific component config or widget", "operationId": "addFile", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "type": "file", "description": "File to be uploaded", "name": "inputFile", "in": "formData", "required": true }, { "type": "string", "description": "Set to config for files of component config, set to widget for files of widget", "name": "objectType", "in": "query", "required": true }, { "type": "integer", "description": "ID of either config or widget of which files are requested", "name": "objectID", "in": "query", "required": true } ], "responses": { "200": { "description": "File that was added", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseFile" } }, "400": { "description": "Bad request", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } } }, "/files/{fileID}": { "get": { "produces": [ "text/plain", "image/png", "image/jpeg", "image/gif", "model/x-cim", "model/x-cim.zip" ], "tags": [ "files" ], "summary": "Download a file", "operationId": "getFile", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "ID of the file to download", "name": "fileID", "in": "path", "required": true } ], "responses": { "200": { "description": "File that was requested", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseFile" } }, "400": { "description": "Bad request", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } }, "put": { "consumes": [ "text/plain", "image/png", "image/jpeg", "image/gif", "model/x-cim", "model/x-cim.zip" ], "produces": [ "application/json" ], "tags": [ "files" ], "summary": "Update a file", "operationId": "updateFile", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "type": "file", "description": "File to be uploaded", "name": "inputFile", "in": "formData", "required": true }, { "type": "integer", "description": "ID of the file to update", "name": "fileID", "in": "path", "required": true } ], "responses": { "200": { "description": "File that was updated", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseFile" } }, "400": { "description": "Bad request", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "files" ], "summary": "Delete a file", "operationId": "deleteFile", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "ID of the file to update", "name": "fileID", "in": "path", "required": true } ], "responses": { "200": { "description": "File that was deleted", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseFile" } }, "400": { "description": "Bad request", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } } }, "/healthz": { "get": { "produces": [ "application/json" ], "tags": [ "healthz" ], "summary": "Get health status of backend", "operationId": "getHealth", "responses": { "200": { "description": "Backend is healthy, database and AMQP broker connections are alive" }, "500": { "description": "Backend is NOT healthy", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } } }, "/ic": { "get": { "produces": [ "application/json" ], "tags": [ "infrastructure-components" ], "summary": "Get all infrastructure components", "operationId": "getICs", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "ICs requested", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseICs" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "infrastructure-components" ], "summary": "Add an infrastructure component", "operationId": "addIC", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "description": "Infrastructure Component to be added", "name": "inputIC", "in": "body", "required": true, "schema": { "type": "object", "$ref": "#/definitions/infrastructure_component.addICRequest" } } ], "responses": { "200": { "description": "Infrastructure Component that was added", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseIC" } }, "400": { "description": "Bad request", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } } }, "/ic/{ICID}": { "get": { "produces": [ "application/json" ], "tags": [ "infrastructure-components" ], "summary": "Get infrastructure component", "operationId": "getIC", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "Infrastructure Component ID", "name": "ICID", "in": "path", "required": true } ], "responses": { "200": { "description": "Infrastructure Component that was requested", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseIC" } }, "400": { "description": "Bad request", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "infrastructure-components" ], "summary": "Update an infrastructure component", "operationId": "updateIC", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "description": "InfrastructureComponent to be updated", "name": "inputIC", "in": "body", "required": true, "schema": { "type": "object", "$ref": "#/definitions/infrastructure_component.updateICRequest" } }, { "type": "integer", "description": "InfrastructureComponent ID", "name": "ICID", "in": "path", "required": true } ], "responses": { "200": { "description": "Infrastructure Component that was updated", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseIC" } }, "400": { "description": "Bad request", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "infrastructure-components" ], "summary": "Delete an infrastructure component", "operationId": "deleteIC", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "Infrastructure Component ID", "name": "ICID", "in": "path", "required": true } ], "responses": { "200": { "description": "Infrastructure Component that was deleted", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseIC" } }, "400": { "description": "Bad request", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } } }, "/ic/{ICID}/action": { "post": { "produces": [ "application/json" ], "tags": [ "AMQP" ], "summary": "Send an action to IC (only available if backend server is started with -amqp parameter)", "operationId": "sendActionToIC", "parameters": [ { "type": "string", "description": "Action for IC", "name": "inputAction", "in": "query", "required": true }, { "type": "integer", "description": "InfrastructureComponent ID", "name": "ICID", "in": "path", "required": true } ], "responses": { "200": { "description": "Action sent successfully", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "400": { "description": "Bad request", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } } }, "/ic/{ICID}/configs": { "get": { "produces": [ "application/json" ], "tags": [ "infrastructure-components" ], "summary": "Get all configurations of the infrastructure component", "operationId": "getConfigsOfIC", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "Infrastructure Component ID", "name": "ICID", "in": "path", "required": true } ], "responses": { "200": { "description": "Configs requested by user", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseConfigs" } }, "400": { "description": "Bad request", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } } }, "/metrics": { "get": { "produces": [ "application/json" ], "tags": [ "metrics" ], "summary": "Prometheus metrics endpoint", "operationId": "getMetrics", "responses": { "200": { "description": "Returns Prometheus metrics" } } } }, "/scenarios": { "get": { "produces": [ "application/json" ], "tags": [ "scenarios" ], "summary": "Get all scenarios of requesting user", "operationId": "getScenarios", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "Scenarios to which user has access", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseScenarios" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "scenarios" ], "summary": "Add a scenario", "operationId": "addScenario", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "description": "Scenario to be added", "name": "inputScenario", "in": "body", "required": true, "schema": { "type": "object", "$ref": "#/definitions/scenario.addScenarioRequest" } } ], "responses": { "200": { "description": "scenario that was added", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseScenario" } }, "400": { "description": "Bad request", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } } }, "/scenarios/{scenarioID}": { "get": { "produces": [ "application/json" ], "tags": [ "scenarios" ], "summary": "Get scenario", "operationId": "getScenario", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "Scenario ID", "name": "scenarioID", "in": "path", "required": true } ], "responses": { "200": { "description": "Scenario requested by user", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseScenario" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "scenarios" ], "summary": "Update a scenario", "operationId": "updateScenario", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "description": "Scenario to be updated", "name": "inputScenario", "in": "body", "required": true, "schema": { "type": "object", "$ref": "#/definitions/scenario.updateScenarioRequest" } }, { "type": "integer", "description": "Scenario ID", "name": "scenarioID", "in": "path", "required": true } ], "responses": { "200": { "description": "Updated scenario.", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseScenario" } }, "400": { "description": "Bad request", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "scenarios" ], "summary": "Delete a scenario", "operationId": "deleteScenario", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "Scenario ID", "name": "scenarioID", "in": "path", "required": true } ], "responses": { "200": { "description": "Deleted scenario", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseScenario" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } } }, "/scenarios/{scenarioID}/user": { "put": { "produces": [ "application/json" ], "tags": [ "scenarios" ], "summary": "Add a user to a a scenario", "operationId": "addUserToScenario", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "Scenario ID", "name": "scenarioID", "in": "path", "required": true }, { "type": "string", "description": "User name", "name": "username", "in": "query", "required": true } ], "responses": { "200": { "description": "User that was added to scenario", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseUser" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "scenarios" ], "summary": "Delete a user from a scenario", "operationId": "deleteUserFromScenario", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "Scenario ID", "name": "scenarioID", "in": "path", "required": true }, { "type": "string", "description": "User name", "name": "username", "in": "query", "required": true } ], "responses": { "200": { "description": "User that was deleted from scenario", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseUser" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } } }, "/scenarios/{scenarioID}/users/": { "get": { "produces": [ "application/json" ], "tags": [ "scenarios" ], "summary": "Get users of a scenario", "operationId": "getUsersOfScenario", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "Scenario ID", "name": "scenarioID", "in": "path", "required": true } ], "responses": { "200": { "description": "Array of users that have access to the scenario", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseUsers" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } } }, "/signals": { "get": { "produces": [ "application/json" ], "tags": [ "signals" ], "summary": "Get all signals of one direction", "operationId": "getSignals", "parameters": [ { "type": "string", "description": "Direction of signal (in or out)", "name": "direction", "in": "query", "required": true }, { "type": "string", "description": "Config ID of signals to be obtained", "name": "configID", "in": "query", "required": true }, { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "Signals which belong to component configuration", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseSignals" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "signals" ], "summary": "Add a signal to a signal mapping of a component configuration", "operationId": "AddSignal", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "description": "A signal to be added to the component configuration incl. direction and config ID to which signal shall be added", "name": "inputSignal", "in": "body", "required": true, "schema": { "type": "object", "$ref": "#/definitions/signal.addSignalRequest" } } ], "responses": { "200": { "description": "Signal that was added", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseSignal" } }, "400": { "description": "Bad request", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } } }, "/signals/{signalID}": { "get": { "produces": [ "application/json" ], "tags": [ "signals" ], "summary": "Get a signal", "operationId": "getSignal", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "ID of signal to be obtained", "name": "signalID", "in": "path", "required": true } ], "responses": { "200": { "description": "Signal that was requested", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseSignal" } }, "400": { "description": "Bad request", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } }, "put": { "produces": [ "application/json" ], "tags": [ "signals" ], "summary": "Update a signal", "operationId": "updateSignal", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "description": "A signal to be updated", "name": "inputSignal", "in": "body", "required": true, "schema": { "type": "object", "$ref": "#/definitions/signal.updateSignalRequest" } }, { "type": "integer", "description": "ID of signal to be updated", "name": "signalID", "in": "path", "required": true } ], "responses": { "200": { "description": "Signal that was updated", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseSignal" } }, "400": { "description": "Bad request", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "signals" ], "summary": "Delete a signal", "operationId": "deleteSignal", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "ID of signal to be deleted", "name": "signalID", "in": "path", "required": true } ], "responses": { "200": { "description": "Signal that was deleted", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseSignal" } }, "400": { "description": "Bad request", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } } }, "/users": { "get": { "produces": [ "application/json" ], "tags": [ "users" ], "summary": "Get all users", "operationId": "GetUsers", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "Array of users", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseUsers" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "Add a user", "operationId": "AddUser", "parameters": [ { "description": "User to be added", "name": "inputUser", "in": "body", "required": true, "schema": { "type": "object", "$ref": "#/definitions/user.addUserRequest" } }, { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "Contains added user object", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseUser" } }, "400": { "description": "Bad request", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } } }, "/users/{userID}": { "get": { "produces": [ "application/json" ], "tags": [ "users" ], "summary": "Get user", "operationId": "GetUser", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "User ID", "name": "userID", "in": "path", "required": true } ], "responses": { "200": { "description": "requested user", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseUser" } }, "403": { "description": "Access forbidden.", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "Update a user", "operationId": "UpdateUser", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "description": "User to be updated (anything except for ID can be changed, role can only be change by admin)", "name": "inputUser", "in": "body", "required": true, "schema": { "type": "object", "$ref": "#/definitions/user.updateUserRequest" } }, { "type": "integer", "description": "User ID", "name": "userID", "in": "path", "required": true } ], "responses": { "200": { "description": "Contains updated user", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseUser" } }, "400": { "description": "Bad request.", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "403": { "description": "Access forbidden.", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "users" ], "summary": "Delete a user", "operationId": "DeleteUser", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "User ID", "name": "userID", "in": "path", "required": true } ], "responses": { "200": { "description": "deleted user", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseUser" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } } }, "/widgets": { "get": { "produces": [ "application/json" ], "tags": [ "widgets" ], "summary": "Get all widgets of dashboard", "operationId": "getWidgets", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "Dashboard ID", "name": "dashboardID", "in": "query", "required": true } ], "responses": { "200": { "description": "Widgets to which belong to dashboard", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseWidgets" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "widgets" ], "summary": "Add a widget to a dashboard", "operationId": "addWidget", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "description": "Widget to be added incl. ID of dashboard", "name": "inputWidget", "in": "body", "required": true, "schema": { "type": "object", "$ref": "#/definitions/widget.addWidgetRequest" } } ], "responses": { "200": { "description": "Widget that was added", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseWidget" } }, "400": { "description": "Bad request", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } } }, "/widgets/{widgetID}": { "get": { "produces": [ "application/json" ], "tags": [ "widgets" ], "summary": "Get a widget", "operationId": "getWidget", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "Widget ID", "name": "widgetID", "in": "path", "required": true } ], "responses": { "200": { "description": "Widget that was requested", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseWidget" } }, "400": { "description": "Bad request", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "widgets" ], "summary": "Update a widget", "operationId": "updateWidget", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "description": "Widget to be updated", "name": "inputWidget", "in": "body", "required": true, "schema": { "type": "object", "$ref": "#/definitions/widget.updateWidgetRequest" } }, { "type": "integer", "description": "Widget ID", "name": "widgetID", "in": "path", "required": true } ], "responses": { "200": { "description": "Widget that was updated", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseWidget" } }, "400": { "description": "Bad request", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "widgets" ], "summary": "Delete a widget", "operationId": "deleteWidget", "parameters": [ { "type": "string", "description": "Authorization token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "Widget ID", "name": "widgetID", "in": "path", "required": true } ], "responses": { "200": { "description": "Widget that was deleted", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseWidget" } }, "400": { "description": "Bad request", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "404": { "description": "Not found", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } }, "500": { "description": "Internal server error", "schema": { "type": "object", "$ref": "#/definitions/docs.ResponseError" } } } } } }, "definitions": { "component_configuration.addConfigRequest": { "type": "object", "properties": { "config": { "type": "object", "$ref": "#/definitions/component_configuration.validNewConfig" } } }, "component_configuration.updateConfigRequest": { "type": "object", "properties": { "config": { "type": "object", "$ref": "#/definitions/component_configuration.validUpdatedConfig" } } }, "component_configuration.validNewConfig": { "type": "object", "required": [ "ICID", "Name", "ScenarioID", "StartParameters" ], "properties": { "ICID": { "type": "integer" }, "Name": { "type": "string" }, "ScenarioID": { "type": "integer" }, "SelectedFileID": { "type": "integer" }, "StartParameters": { "type": "string" } } }, "component_configuration.validUpdatedConfig": { "type": "object", "properties": { "ICID": { "type": "integer" }, "Name": { "type": "string" }, "SelectedFileID": { "type": "integer" }, "StartParameters": { "type": "string" } } }, "dashboard.addDashboardRequest": { "type": "object", "properties": { "dashboard": { "type": "object", "$ref": "#/definitions/dashboard.validNewDashboard" } } }, "dashboard.updateDashboardRequest": { "type": "object", "properties": { "dashboard": { "type": "object", "$ref": "#/definitions/dashboard.validUpdatedDashboard" } } }, "dashboard.validNewDashboard": { "type": "object", "required": [ "Grid", "Name", "ScenarioID" ], "properties": { "Grid": { "type": "integer" }, "Name": { "type": "string" }, "ScenarioID": { "type": "integer" } } }, "dashboard.validUpdatedDashboard": { "type": "object", "properties": { "grid": { "type": "integer" }, "name": { "type": "string" } } }, "database.ComponentConfiguration": { "type": "object", "properties": { "icID": { "description": "ID of IC associated with Component Configuration", "type": "integer" }, "id": { "type": "integer" }, "inputLength": { "description": "Number of input signals", "type": "integer" }, "name": { "description": "Name of Component Configuration", "type": "string" }, "outputLength": { "description": "Number of output signals", "type": "integer" }, "scenarioID": { "description": "ID of Scenario to which Component Configuration belongs", "type": "integer" }, "selectedFileID": { "description": "Currently selected FileID", "type": "integer" }, "startParameters": { "description": "Start parameters of Component Configuration as JSON", "type": "string" } } }, "database.Dashboard": { "type": "object", "properties": { "grid": { "description": "Grid of dashboard", "type": "integer" }, "id": { "type": "integer" }, "name": { "description": "Name of dashboard", "type": "string" }, "scenarioID": { "description": "ID of scenario to which dashboard belongs", "type": "integer" } } }, "database.File": { "type": "object", "properties": { "configID": { "description": "ID of Component Configuration to which file belongs", "type": "integer" }, "date": { "description": "Last modification time of file", "type": "string" }, "id": { "type": "integer" }, "imageHeight": { "description": "Height of image (only needed in case of image)", "type": "integer" }, "imageWidth": { "description": "Width of image (only needed in case of image)", "type": "integer" }, "name": { "description": "Name of file", "type": "string" }, "size": { "description": "Size of file (in byte)", "type": "integer" }, "type": { "description": "Type of file (MIME type)", "type": "string" }, "widgetID": { "description": "ID of widget to which file belongs", "type": "integer" } } }, "database.InfrastructureComponent": { "type": "object", "properties": { "host": { "description": "Host if the IC", "type": "string" }, "id": { "type": "integer" }, "modelType": { "description": "Model type supported by the IC", "type": "string" }, "properties": { "description": "Properties of IC as JSON string", "type": "string" }, "rawProperties": { "description": "Raw properties of IC as JSON string", "type": "string" }, "state": { "description": "State of the IC", "type": "string" }, "stateUpdateAt": { "description": "Time of last state update", "type": "string" }, "uptime": { "description": "Uptime of the IC", "type": "integer" }, "uuid": { "description": "UUID of the IC", "type": "string" } } }, "database.Scenario": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "description": "Name of scenario", "type": "string" }, "running": { "description": "Running state of scenario", "type": "boolean" }, "startParameters": { "description": "Start parameters of scenario as JSON", "type": "string" } } }, "database.Signal": { "type": "object", "properties": { "configID": { "description": "ID of Component Configuration", "type": "integer" }, "direction": { "description": "Direction of the signal (in or out)", "type": "string" }, "id": { "type": "integer" }, "index": { "description": "Index of the Signal in the mapping", "type": "integer" }, "name": { "description": "Name of Signal", "type": "string" }, "unit": { "description": "Unit of Signal", "type": "string" } } }, "database.User": { "type": "object", "properties": { "active": { "description": "Indicating status of user (false means user is inactive and should not be able to login)", "type": "boolean" }, "id": { "type": "integer" }, "mail": { "description": "Mail of user", "type": "string" }, "role": { "description": "Role of user", "type": "string" }, "username": { "description": "Username of user", "type": "string" } } }, "database.Widget": { "type": "object", "properties": { "customProperties": { "description": "Custom properties of widget as JSON string", "type": "string" }, "dashboardID": { "description": "ID of dashboard to which widget belongs", "type": "integer" }, "height": { "description": "Height of widget", "type": "integer" }, "id": { "type": "integer" }, "isLocked": { "description": "Locked state of widget", "type": "boolean" }, "minHeight": { "description": "Minimal height of widget", "type": "integer" }, "minWidth": { "description": "Minimal width of widget", "type": "integer" }, "name": { "description": "Name of widget", "type": "string" }, "signalIDs": { "description": "IDs of signals that widget uses", "type": "string" }, "type": { "description": "Type of widget", "type": "string" }, "width": { "description": "Width of widget", "type": "integer" }, "x": { "description": "X position of widget", "type": "integer" }, "y": { "description": "Y position of widget", "type": "integer" }, "z": { "description": "Z position of widget", "type": "integer" } } }, "docs.ResponseAuthenticate": { "type": "object", "properties": { "message": { "type": "string" }, "success": { "type": "boolean" }, "token": { "type": "string" }, "user": { "type": "object", "$ref": "#/definitions/database.User" } } }, "docs.ResponseConfig": { "type": "object", "properties": { "config": { "type": "object", "$ref": "#/definitions/database.ComponentConfiguration" } } }, "docs.ResponseConfigs": { "type": "object", "properties": { "configs": { "type": "array", "items": { "$ref": "#/definitions/database.ComponentConfiguration" } } } }, "docs.ResponseDashboard": { "type": "object", "properties": { "dashboard": { "type": "object", "$ref": "#/definitions/database.Dashboard" } } }, "docs.ResponseDashboards": { "type": "object", "properties": { "dashboards": { "type": "array", "items": { "$ref": "#/definitions/database.Dashboard" } } } }, "docs.ResponseError": { "type": "object", "properties": { "message": { "type": "string" }, "success": { "type": "boolean" } } }, "docs.ResponseFile": { "type": "object", "properties": { "file": { "type": "object", "$ref": "#/definitions/database.File" } } }, "docs.ResponseFiles": { "type": "object", "properties": { "files": { "type": "array", "items": { "$ref": "#/definitions/database.File" } } } }, "docs.ResponseIC": { "type": "object", "properties": { "ic": { "type": "object", "$ref": "#/definitions/database.InfrastructureComponent" } } }, "docs.ResponseICs": { "type": "object", "properties": { "ics": { "type": "array", "items": { "$ref": "#/definitions/database.InfrastructureComponent" } } } }, "docs.ResponseScenario": { "type": "object", "properties": { "scenario": { "type": "object", "$ref": "#/definitions/database.Scenario" } } }, "docs.ResponseScenarios": { "type": "object", "properties": { "scenarios": { "type": "array", "items": { "$ref": "#/definitions/database.Scenario" } } } }, "docs.ResponseSignal": { "type": "object", "properties": { "signal": { "type": "object", "$ref": "#/definitions/database.Signal" } } }, "docs.ResponseSignals": { "type": "object", "properties": { "signals": { "type": "array", "items": { "$ref": "#/definitions/database.Signal" } } } }, "docs.ResponseUser": { "type": "object", "properties": { "user": { "type": "object", "$ref": "#/definitions/database.User" } } }, "docs.ResponseUsers": { "type": "object", "properties": { "users": { "type": "array", "items": { "$ref": "#/definitions/database.User" } } } }, "docs.ResponseWidget": { "type": "object", "properties": { "widget": { "type": "object", "$ref": "#/definitions/database.Widget" } } }, "docs.ResponseWidgets": { "type": "object", "properties": { "widgets": { "type": "array", "items": { "$ref": "#/definitions/database.Widget" } } } }, "infrastructure_component.addICRequest": { "type": "object", "properties": { "ic": { "type": "object", "$ref": "#/definitions/infrastructure_component.validNewIC" } } }, "infrastructure_component.updateICRequest": { "type": "object", "properties": { "ic": { "type": "object", "$ref": "#/definitions/infrastructure_component.validUpdatedIC" } } }, "infrastructure_component.validNewIC": { "type": "object", "required": [ "Host", "Modeltype", "Properties", "UUID" ], "properties": { "Host": { "type": "string" }, "Modeltype": { "type": "string" }, "Properties": { "type": "string" }, "State": { "type": "string" }, "UUID": { "type": "string" } } }, "infrastructure_component.validUpdatedIC": { "type": "object", "properties": { "Host": { "type": "string" }, "Modeltype": { "type": "string" }, "Properties": { "type": "string" }, "State": { "type": "string" }, "UUID": { "type": "string" } } }, "scenario.addScenarioRequest": { "type": "object", "properties": { "scenario": { "type": "object", "$ref": "#/definitions/scenario.validNewScenario" } } }, "scenario.updateScenarioRequest": { "type": "object", "properties": { "scenario": { "type": "object", "$ref": "#/definitions/scenario.validUpdatedScenario" } } }, "scenario.validNewScenario": { "type": "object", "required": [ "Name", "StartParameters" ], "properties": { "Name": { "type": "string" }, "Running": { "type": "boolean" }, "StartParameters": { "type": "string" } } }, "scenario.validUpdatedScenario": { "type": "object", "properties": { "Name": { "type": "string" }, "Running": { "type": "boolean" }, "StartParameters": { "type": "string" } } }, "signal.addSignalRequest": { "type": "object", "properties": { "signal": { "type": "object", "$ref": "#/definitions/signal.validNewSignal" } } }, "signal.updateSignalRequest": { "type": "object", "properties": { "signal": { "type": "object", "$ref": "#/definitions/signal.validUpdatedSignal" } } }, "signal.validNewSignal": { "type": "object", "required": [ "ConfigID", "Direction", "Index", "Name" ], "properties": { "ConfigID": { "type": "integer" }, "Direction": { "type": "string" }, "Index": { "type": "integer" }, "Name": { "type": "string" }, "Unit": { "type": "string" } } }, "signal.validUpdatedSignal": { "type": "object", "properties": { "Index": { "type": "integer" }, "Name": { "type": "string" }, "Unit": { "type": "string" } } }, "user.addUserRequest": { "type": "object", "properties": { "user": { "type": "object", "$ref": "#/definitions/user.validNewUser" } } }, "user.loginRequest": { "type": "object", "required": [ "Password", "Username" ], "properties": { "Password": { "type": "string" }, "Username": { "type": "string" } } }, "user.updateUserRequest": { "type": "object", "properties": { "user": { "type": "object", "$ref": "#/definitions/user.validUpdatedRequest" } } }, "user.validNewUser": { "type": "object", "required": [ "Mail", "Password", "Role", "Username" ], "properties": { "Mail": { "type": "string" }, "Password": { "type": "string" }, "Role": { "type": "string" }, "Username": { "type": "string" } } }, "user.validUpdatedRequest": { "type": "object", "properties": { "Active": { "type": "string" }, "Mail": { "type": "string" }, "OldPassword": { "type": "string" }, "Password": { "type": "string" }, "Role": { "type": "string" }, "Username": { "type": "string" } } }, "widget.addWidgetRequest": { "type": "object", "properties": { "widget": { "type": "object", "$ref": "#/definitions/widget.validNewWidget" } } }, "widget.updateWidgetRequest": { "type": "object", "properties": { "widget": { "type": "object", "$ref": "#/definitions/widget.validUpdatedWidget" } } }, "widget.validNewWidget": { "type": "object", "required": [ "DashboardID", "Height", "Name", "Type", "Width" ], "properties": { "CustomProperties": { "type": "string" }, "DashboardID": { "type": "integer" }, "Height": { "type": "integer" }, "IsLocked": { "type": "boolean" }, "MinHeight": { "type": "integer" }, "MinWidth": { "type": "integer" }, "Name": { "type": "string" }, "SignalIDs": { "type": "array", "items": { "type": "integer" } }, "Type": { "type": "string" }, "Width": { "type": "integer" }, "X": { "type": "integer" }, "Y": { "type": "integer" }, "Z": { "type": "integer" } } }, "widget.validUpdatedWidget": { "type": "object", "properties": { "CustomProperties": { "type": "string" }, "Height": { "type": "integer" }, "IsLocked": { "type": "boolean" }, "MinHeight": { "type": "integer" }, "MinWidth": { "type": "integer" }, "Name": { "type": "string" }, "SignalIDs": { "type": "array", "items": { "type": "integer" } }, "Type": { "type": "string" }, "Width": { "type": "integer" }, "X": { "type": "integer" }, "Y": { "type": "integer" }, "Z": { "type": "integer" } } } } }` type swaggerInfo struct { Version string Host string BasePath string Schemes []string Title string Description string } // SwaggerInfo holds exported Swagger Info so clients can modify it var SwaggerInfo = swaggerInfo{Schemes: []string{}} type s struct{} func (s *s) ReadDoc() string { t, err := template.New("swagger_info").Funcs(template.FuncMap{ "marshal": func(v interface{}) string { a, _ := json.Marshal(v) return string(a) }, }).Parse(doc) if err != nil { return doc } var tpl bytes.Buffer if err := t.Execute(&tpl, SwaggerInfo); err != nil { return doc } return tpl.String() } func init() { swag.Register(swag.Name, &s{}) }