VILLASweb-backend-go/doc/api/docs.go
2021-01-12 17:06:02 +01:00

4442 lines
150 KiB
Go

// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// This file was generated by swaggo/swag at
// 2021-01-12 17:04:27.751319166 +0100 CET m=+0.123714746
package docs
import (
"bytes"
"encoding/json"
"strings"
"github.com/alecthomas/template"
"github.com/swaggo/swag"
)
var doc = `{
"schemes": {{ marshal .Schemes }},
"swagger": "2.0",
"info": {
"description": "{{.Description}}",
"title": "{{.Title}}",
"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": "{{.Version}}"
},
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"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": {
"$ref": "#/definitions/docs.ResponseAuthenticate"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error.",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
}
},
"/configs": {
"get": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"component-configurations"
],
"summary": "Get all component configurations of scenario",
"operationId": "getConfigs",
"parameters": [
{
"type": "integer",
"description": "Scenario ID",
"name": "scenarioID",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "Component configurations which belong to scenario",
"schema": {
"$ref": "#/definitions/docs.ResponseConfigs"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
},
"post": {
"security": [
{
"Bearer": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"component-configurations"
],
"summary": "Add a component configuration to a scenario",
"operationId": "addConfig",
"parameters": [
{
"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": {
"$ref": "#/definitions/docs.ResponseConfig"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
}
},
"/configs/{configID}": {
"get": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"component-configurations"
],
"summary": "Get a component configuration",
"operationId": "getConfig",
"parameters": [
{
"type": "integer",
"description": "Config ID",
"name": "configID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "component configuration that was requested",
"schema": {
"$ref": "#/definitions/docs.ResponseConfig"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
},
"put": {
"security": [
{
"Bearer": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"component-configurations"
],
"summary": "Update a component configuration",
"operationId": "updateConfig",
"parameters": [
{
"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": {
"$ref": "#/definitions/docs.ResponseConfig"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
},
"delete": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"component-configurations"
],
"summary": "Delete a component configuration",
"operationId": "deleteConfig",
"parameters": [
{
"type": "integer",
"description": "Config ID",
"name": "configID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "component configuration that was deleted",
"schema": {
"$ref": "#/definitions/docs.ResponseConfig"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
}
},
"/dashboards": {
"get": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"dashboards"
],
"summary": "Get all dashboards of scenario",
"operationId": "getDashboards",
"parameters": [
{
"type": "integer",
"description": "Scenario ID",
"name": "scenarioID",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "Dashboards which belong to scenario",
"schema": {
"$ref": "#/definitions/docs.ResponseDashboards"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
},
"post": {
"security": [
{
"Bearer": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"dashboards"
],
"summary": "Add a dashboard to a scenario",
"operationId": "addDashboard",
"parameters": [
{
"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": {
"$ref": "#/definitions/docs.ResponseDashboard"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
}
},
"/dashboards/{dashboardID}": {
"get": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"dashboards"
],
"summary": "Get a dashboard",
"operationId": "getDashboard",
"parameters": [
{
"type": "integer",
"description": "Dashboard ID",
"name": "dashboardID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Dashboard that was requested",
"schema": {
"$ref": "#/definitions/docs.ResponseDashboard"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
},
"put": {
"security": [
{
"Bearer": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"dashboards"
],
"summary": "Update a dashboard",
"operationId": "updateDashboard",
"parameters": [
{
"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": {
"$ref": "#/definitions/docs.ResponseDashboard"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
},
"delete": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"dashboards"
],
"summary": "Delete a dashboard",
"operationId": "deleteDashboard",
"parameters": [
{
"type": "integer",
"description": "Dashboard ID",
"name": "dashboardID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Dashboard that was deleted",
"schema": {
"$ref": "#/definitions/docs.ResponseDashboard"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
}
},
"/files": {
"get": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"files"
],
"summary": "Get all files of a specific scenario",
"operationId": "getFiles",
"parameters": [
{
"type": "integer",
"description": "Scenario ID",
"name": "scenarioID",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "Files which belong to scenario",
"schema": {
"$ref": "#/definitions/docs.ResponseFiles"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
},
"post": {
"security": [
{
"Bearer": []
}
],
"consumes": [
"text/plain",
"image/png",
"image/jpeg",
"image/gif",
"model/x-cim",
"model/x-cim.zip",
"multipart/form-data"
],
"produces": [
"application/json"
],
"tags": [
"files"
],
"summary": "Add a file to a specific scenario",
"operationId": "addFile",
"parameters": [
{
"type": "file",
"description": "File to be uploaded",
"name": "inputFile",
"in": "formData",
"required": true
},
{
"type": "integer",
"description": "ID of scenario to which file shall be added",
"name": "scenarioID",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "File that was added",
"schema": {
"$ref": "#/definitions/docs.ResponseFile"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
}
},
"/files/{fileID}": {
"get": {
"security": [
{
"Bearer": []
}
],
"produces": [
"text/plain",
"text/csv",
"application/gzip",
"application/x-gtar",
"application/x-tar",
"application/x-ustar",
"application/zip",
"application/msexcel",
"application/xml",
"application/x-bag",
"image/png",
"image/jpeg",
"image/gif",
"model/x-cim",
"model/x-cim.zip"
],
"tags": [
"files"
],
"summary": "Download a file",
"operationId": "getFile",
"parameters": [
{
"type": "integer",
"description": "ID of the file to download",
"name": "fileID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "File that was requested",
"schema": {
"$ref": "#/definitions/docs.ResponseFile"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
},
"put": {
"security": [
{
"Bearer": []
}
],
"consumes": [
"text/plain",
"image/png",
"image/jpeg",
"image/gif",
"model/x-cim",
"model/x-cim.zip",
"multipart/form-data"
],
"produces": [
"application/json"
],
"tags": [
"files"
],
"summary": "Update a file",
"operationId": "updateFile",
"parameters": [
{
"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": {
"$ref": "#/definitions/docs.ResponseFile"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
},
"delete": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"files"
],
"summary": "Delete a file",
"operationId": "deleteFile",
"parameters": [
{
"type": "integer",
"description": "ID of the file to update",
"name": "fileID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "File that was deleted",
"schema": {
"$ref": "#/definitions/docs.ResponseFile"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$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": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
}
},
"/ic": {
"get": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"infrastructure-components"
],
"summary": "Get all infrastructure components",
"operationId": "getICs",
"responses": {
"200": {
"description": "ICs requested",
"schema": {
"$ref": "#/definitions/docs.ResponseICs"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
},
"post": {
"security": [
{
"Bearer": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"infrastructure-components"
],
"summary": "Add an infrastructure component",
"operationId": "addIC",
"parameters": [
{
"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": {
"$ref": "#/definitions/docs.ResponseIC"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
}
},
"/ic/{ICID}": {
"get": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"infrastructure-components"
],
"summary": "Get infrastructure component",
"operationId": "getIC",
"parameters": [
{
"type": "integer",
"description": "Infrastructure Component ID",
"name": "ICID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Infrastructure Component that was requested",
"schema": {
"$ref": "#/definitions/docs.ResponseIC"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
},
"put": {
"security": [
{
"Bearer": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"infrastructure-components"
],
"summary": "Update an infrastructure component",
"operationId": "updateIC",
"parameters": [
{
"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": {
"$ref": "#/definitions/docs.ResponseIC"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
},
"delete": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"infrastructure-components"
],
"summary": "Delete an infrastructure component",
"operationId": "deleteIC",
"parameters": [
{
"type": "integer",
"description": "Infrastructure Component ID",
"name": "ICID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Infrastructure Component that was deleted",
"schema": {
"$ref": "#/definitions/docs.ResponseIC"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
}
},
"/ic/{ICID}/action": {
"post": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"infrastructure-components"
],
"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": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
}
},
"/ic/{ICID}/configs": {
"get": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"infrastructure-components"
],
"summary": "Get all configurations of the infrastructure component",
"operationId": "getConfigsOfIC",
"parameters": [
{
"type": "integer",
"description": "Infrastructure Component ID",
"name": "ICID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Configs requested by user",
"schema": {
"$ref": "#/definitions/docs.ResponseConfigs"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
}
},
"/metrics": {
"get": {
"produces": [
"application/json"
],
"tags": [
"metrics"
],
"summary": "Prometheus metrics endpoint",
"operationId": "getMetrics",
"responses": {
"200": {
"description": "Returns Prometheus metrics"
}
}
}
},
"/results": {
"get": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"results"
],
"summary": "Get all results of scenario",
"operationId": "getResults",
"parameters": [
{
"type": "integer",
"description": "Scenario ID",
"name": "scenarioID",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "Results which belong to scenario",
"schema": {
"$ref": "#/definitions/docs.ResponseResults"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
},
"post": {
"security": [
{
"Bearer": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"results"
],
"summary": "Add a result to a scenario",
"operationId": "addResult",
"parameters": [
{
"description": "Result to be added incl. ID of Scenario",
"name": "inputResult",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/result.addResultRequest"
}
}
],
"responses": {
"200": {
"description": "Result that was added",
"schema": {
"$ref": "#/definitions/docs.ResponseResult"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
}
},
"/results/{resultID}": {
"get": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"results"
],
"summary": "Get a Result",
"operationId": "getResult",
"parameters": [
{
"type": "integer",
"description": "Result ID",
"name": "resultID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Result that was requested",
"schema": {
"$ref": "#/definitions/docs.ResponseResult"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
},
"put": {
"security": [
{
"Bearer": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"results"
],
"summary": "Update a result",
"operationId": "updateResult",
"parameters": [
{
"description": "Result to be updated",
"name": "inputResult",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/result.updateResultRequest"
}
},
{
"type": "integer",
"description": "Result ID",
"name": "resultID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Result that was updated",
"schema": {
"$ref": "#/definitions/docs.ResponseResult"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
},
"delete": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"results"
],
"summary": "Delete a Result incl. all result files",
"operationId": "deleteResult",
"parameters": [
{
"type": "integer",
"description": "Result ID",
"name": "resultID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Result that was deleted",
"schema": {
"$ref": "#/definitions/docs.ResponseResult"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
}
},
"/results/{resultID}/file": {
"post": {
"security": [
{
"Bearer": []
}
],
"consumes": [
"text/plain",
"text/csv",
"application/gzip",
"application/x-gtar",
"application/x-tar",
"application/x-ustar",
"application/zip",
"application/msexcel",
"application/xml",
"application/x-bag"
],
"produces": [
"application/json"
],
"tags": [
"results"
],
"summary": "Upload a result file to the DB and associate it with scenario and result",
"operationId": "addResultFile",
"parameters": [
{
"type": "file",
"description": "File to be uploaded",
"name": "inputFile",
"in": "formData",
"required": true
},
{
"type": "integer",
"description": "Result ID",
"name": "resultID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Result that was updated",
"schema": {
"$ref": "#/definitions/docs.ResponseResult"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
}
},
"/results/{resultID}/file/{fileID}": {
"delete": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"results"
],
"summary": "Delete a result file",
"operationId": "deleteResultFile",
"parameters": [
{
"type": "integer",
"description": "Result ID",
"name": "resultID",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "ID of the file to delete",
"name": "fileID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Result for which file was deleted",
"schema": {
"$ref": "#/definitions/docs.ResponseResult"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
}
},
"/scenarios": {
"get": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"scenarios"
],
"summary": "Get all scenarios of requesting user",
"operationId": "getScenarios",
"responses": {
"200": {
"description": "Scenarios to which user has access",
"schema": {
"$ref": "#/definitions/docs.ResponseScenarios"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
},
"post": {
"security": [
{
"Bearer": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"scenarios"
],
"summary": "Add a scenario",
"operationId": "addScenario",
"parameters": [
{
"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": {
"$ref": "#/definitions/docs.ResponseScenario"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
}
},
"/scenarios/{scenarioID}": {
"get": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"scenarios"
],
"summary": "Get scenario",
"operationId": "getScenario",
"parameters": [
{
"type": "integer",
"description": "Scenario ID",
"name": "scenarioID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Scenario requested by user",
"schema": {
"$ref": "#/definitions/docs.ResponseScenario"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
},
"put": {
"security": [
{
"Bearer": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"scenarios"
],
"summary": "Update a scenario",
"operationId": "updateScenario",
"parameters": [
{
"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": {
"$ref": "#/definitions/docs.ResponseScenario"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
},
"delete": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"scenarios"
],
"summary": "Delete a scenario",
"operationId": "deleteScenario",
"parameters": [
{
"type": "integer",
"description": "Scenario ID",
"name": "scenarioID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Deleted scenario",
"schema": {
"$ref": "#/definitions/docs.ResponseScenario"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
}
},
"/scenarios/{scenarioID}/user": {
"put": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"scenarios"
],
"summary": "Add a user to a a scenario",
"operationId": "addUserToScenario",
"parameters": [
{
"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": {
"$ref": "#/definitions/docs.ResponseUser"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
},
"delete": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"scenarios"
],
"summary": "Delete a user from a scenario",
"operationId": "deleteUserFromScenario",
"parameters": [
{
"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": {
"$ref": "#/definitions/docs.ResponseUser"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
}
},
"/scenarios/{scenarioID}/users/": {
"get": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"scenarios"
],
"summary": "Get users of a scenario",
"operationId": "getUsersOfScenario",
"parameters": [
{
"type": "integer",
"description": "Scenario ID",
"name": "scenarioID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Array of users that have access to the scenario",
"schema": {
"$ref": "#/definitions/docs.ResponseUsers"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
}
},
"/signals": {
"get": {
"security": [
{
"Bearer": []
}
],
"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
}
],
"responses": {
"200": {
"description": "Signals which belong to component configuration",
"schema": {
"$ref": "#/definitions/docs.ResponseSignals"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
},
"post": {
"security": [
{
"Bearer": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"signals"
],
"summary": "Add a signal to a signal mapping of a component configuration",
"operationId": "AddSignal",
"parameters": [
{
"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": {
"$ref": "#/definitions/docs.ResponseSignal"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
}
},
"/signals/{signalID}": {
"get": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"signals"
],
"summary": "Get a signal",
"operationId": "getSignal",
"parameters": [
{
"type": "integer",
"description": "ID of signal to be obtained",
"name": "signalID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Signal that was requested",
"schema": {
"$ref": "#/definitions/docs.ResponseSignal"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
},
"put": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"signals"
],
"summary": "Update a signal",
"operationId": "updateSignal",
"parameters": [
{
"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": {
"$ref": "#/definitions/docs.ResponseSignal"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
},
"delete": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"signals"
],
"summary": "Delete a signal",
"operationId": "deleteSignal",
"parameters": [
{
"type": "integer",
"description": "ID of signal to be deleted",
"name": "signalID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Signal that was deleted",
"schema": {
"$ref": "#/definitions/docs.ResponseSignal"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
}
},
"/users": {
"get": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"users"
],
"summary": "Get all users",
"operationId": "GetUsers",
"responses": {
"200": {
"description": "Array of users",
"schema": {
"$ref": "#/definitions/docs.ResponseUsers"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
},
"post": {
"security": [
{
"Bearer": []
}
],
"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"
}
}
],
"responses": {
"200": {
"description": "Contains added user object",
"schema": {
"$ref": "#/definitions/docs.ResponseUser"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
}
},
"/users/{userID}": {
"get": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"users"
],
"summary": "Get user",
"operationId": "GetUser",
"parameters": [
{
"type": "integer",
"description": "User ID",
"name": "userID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "requested user",
"schema": {
"$ref": "#/definitions/docs.ResponseUser"
}
},
"403": {
"description": "Access forbidden.",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
},
"put": {
"security": [
{
"Bearer": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"users"
],
"summary": "Update a user",
"operationId": "UpdateUser",
"parameters": [
{
"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": {
"$ref": "#/definitions/docs.ResponseUser"
}
},
"400": {
"description": "Bad request.",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"403": {
"description": "Access forbidden.",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
},
"delete": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"users"
],
"summary": "Delete a user",
"operationId": "DeleteUser",
"parameters": [
{
"type": "integer",
"description": "User ID",
"name": "userID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "deleted user",
"schema": {
"$ref": "#/definitions/docs.ResponseUser"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
}
},
"/widgets": {
"get": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"widgets"
],
"summary": "Get all widgets of dashboard",
"operationId": "getWidgets",
"parameters": [
{
"type": "integer",
"description": "Dashboard ID",
"name": "dashboardID",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "Widgets to which belong to dashboard",
"schema": {
"$ref": "#/definitions/docs.ResponseWidgets"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
},
"post": {
"security": [
{
"Bearer": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"widgets"
],
"summary": "Add a widget to a dashboard",
"operationId": "addWidget",
"parameters": [
{
"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": {
"$ref": "#/definitions/docs.ResponseWidget"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
}
},
"/widgets/{widgetID}": {
"get": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"widgets"
],
"summary": "Get a widget",
"operationId": "getWidget",
"parameters": [
{
"type": "integer",
"description": "Widget ID",
"name": "widgetID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Widget that was requested",
"schema": {
"$ref": "#/definitions/docs.ResponseWidget"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
},
"put": {
"security": [
{
"Bearer": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"widgets"
],
"summary": "Update a widget",
"operationId": "updateWidget",
"parameters": [
{
"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": {
"$ref": "#/definitions/docs.ResponseWidget"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
}
}
},
"delete": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"widgets"
],
"summary": "Delete a widget",
"operationId": "deleteWidget",
"parameters": [
{
"type": "integer",
"description": "Widget ID",
"name": "widgetID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Widget that was deleted",
"schema": {
"$ref": "#/definitions/docs.ResponseWidget"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"422": {
"description": "Unprocessable entity",
"schema": {
"$ref": "#/definitions/docs.ResponseError"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$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": {
"FileIDs": {
"type": "array",
"items": {
"type": "integer"
}
},
"ICID": {
"type": "integer"
},
"Name": {
"type": "string"
},
"ScenarioID": {
"type": "integer"
},
"StartParameters": {
"type": "string"
}
}
},
"component_configuration.validUpdatedConfig": {
"type": "object",
"properties": {
"FileIDs": {
"type": "array",
"items": {
"type": "integer"
}
},
"ICID": {
"type": "integer"
},
"Name": {
"type": "string"
},
"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"
},
"Height": {
"type": "integer"
},
"Name": {
"type": "string"
},
"ScenarioID": {
"type": "integer"
}
}
},
"dashboard.validUpdatedDashboard": {
"type": "object",
"properties": {
"grid": {
"type": "integer"
},
"height": {
"type": "integer"
},
"name": {
"type": "string"
}
}
},
"database.ComponentConfiguration": {
"type": "object",
"properties": {
"createdAt": {
"type": "string"
},
"fileIDs": {
"description": "Array of file IDs used by the component configuration",
"type": "string"
},
"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"
},
"startParameters": {
"description": "Start parameters of Component Configuration as JSON",
"type": "string"
},
"updatedAt": {
"type": "string"
}
}
},
"database.Dashboard": {
"type": "object",
"properties": {
"createdAt": {
"type": "string"
},
"grid": {
"description": "Grid of dashboard",
"type": "integer"
},
"height": {
"description": "Height 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"
},
"updatedAt": {
"type": "string"
}
}
},
"database.File": {
"type": "object",
"properties": {
"createdAt": {
"type": "string"
},
"date": {
"description": "Last modification time of file",
"type": "string"
},
"id": {
"type": "integer"
},
"imageHeight": {
"description": "Height of an image file in pixels (optional)",
"type": "integer"
},
"imageWidth": {
"description": "Width of an image file in pixels (optional)",
"type": "integer"
},
"name": {
"description": "Name of file",
"type": "string"
},
"scenarioID": {
"description": "ID of Scenario to which file belongs",
"type": "integer"
},
"size": {
"description": "Size of file (in byte)",
"type": "integer"
},
"type": {
"description": "Type of file (MIME type)",
"type": "string"
},
"updatedAt": {
"type": "string"
}
}
},
"database.InfrastructureComponent": {
"type": "object",
"properties": {
"apiurl": {
"description": "API URL of API for IC",
"type": "string"
},
"category": {
"description": "Category of IC (simulator, gateway, database, etc.)",
"type": "string"
},
"createdAt": {
"type": "string"
},
"description": {
"description": "Description of the IC",
"type": "string"
},
"id": {
"type": "integer"
},
"location": {
"description": "Location of the IC",
"type": "string"
},
"managedexternally": {
"description": "Boolean indicating if IC is managed externally (via AMQP/ VILLAScontroller)",
"type": "boolean"
},
"name": {
"description": "Name of the IC",
"type": "string"
},
"startparameterscheme": {
"description": "JSON scheme of start parameters for IC",
"type": "string"
},
"state": {
"description": "State of the IC",
"type": "string"
},
"stateUpdateAt": {
"description": "Time of last state update",
"type": "string"
},
"type": {
"description": "Type of IC (RTDS, VILLASnode, RTDS, etc.)",
"type": "string"
},
"updatedAt": {
"type": "string"
},
"uptime": {
"description": "Uptime of the IC",
"type": "number"
},
"uuid": {
"description": "UUID of the IC",
"type": "string"
},
"websocketurl": {
"description": "WebsocketURL if the IC",
"type": "string"
}
}
},
"database.Result": {
"type": "object",
"properties": {
"configSnapshots": {
"description": "JSON snapshots of component configurations used to generate results",
"type": "string"
},
"createdAt": {
"type": "string"
},
"description": {
"description": "Description of results",
"type": "string"
},
"id": {
"type": "integer"
},
"resultFileIDs": {
"description": "File IDs associated with result",
"type": "string"
},
"scenarioID": {
"description": "ID of Scenario to which result belongs",
"type": "integer"
},
"updatedAt": {
"type": "string"
}
}
},
"database.Scenario": {
"type": "object",
"properties": {
"createdAt": {
"type": "string"
},
"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"
},
"updatedAt": {
"type": "string"
}
}
},
"database.Signal": {
"type": "object",
"properties": {
"configID": {
"description": "ID of Component Configuration",
"type": "integer"
},
"createdAt": {
"type": "string"
},
"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"
},
"scalingFactor": {
"description": "Scaling factor for the signal raw value (defaults to 1.0)",
"type": "number"
},
"unit": {
"description": "Unit of Signal",
"type": "string"
},
"updatedAt": {
"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"
},
"createdAt": {
"type": "string"
},
"id": {
"type": "integer"
},
"mail": {
"description": "Mail of user",
"type": "string"
},
"role": {
"description": "Role of user",
"type": "string"
},
"updatedAt": {
"type": "string"
},
"username": {
"description": "Username of user",
"type": "string"
}
}
},
"database.Widget": {
"type": "object",
"properties": {
"createdAt": {
"type": "string"
},
"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"
},
"updatedAt": {
"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.ResponseResult": {
"type": "object",
"properties": {
"result": {
"type": "object",
"$ref": "#/definitions/database.Result"
}
}
},
"docs.ResponseResults": {
"type": "object",
"properties": {
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/database.Result"
}
}
}
},
"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": [
"Category",
"ManagedExternally",
"Name",
"Type"
],
"properties": {
"APIURL": {
"type": "string"
},
"Category": {
"type": "string"
},
"Description": {
"type": "string"
},
"Location": {
"type": "string"
},
"ManagedExternally": {
"type": "boolean"
},
"Name": {
"type": "string"
},
"StartParameterScheme": {
"type": "string"
},
"State": {
"type": "string"
},
"Type": {
"type": "string"
},
"UUID": {
"type": "string"
},
"Uptime": {
"type": "number"
},
"WebsocketURL": {
"type": "string"
}
}
},
"infrastructure_component.validUpdatedIC": {
"type": "object",
"properties": {
"APIURL": {
"type": "string"
},
"Category": {
"type": "string"
},
"Description": {
"type": "string"
},
"Location": {
"type": "string"
},
"Name": {
"type": "string"
},
"StartParameterScheme": {
"type": "string"
},
"State": {
"type": "string"
},
"Type": {
"type": "string"
},
"UUID": {
"type": "string"
},
"Uptime": {
"type": "number"
},
"WebsocketURL": {
"type": "string"
}
}
},
"result.addResultRequest": {
"type": "object",
"properties": {
"result": {
"type": "object",
"$ref": "#/definitions/result.validNewResult"
}
}
},
"result.updateResultRequest": {
"type": "object",
"properties": {
"result": {
"type": "object",
"$ref": "#/definitions/result.validUpdatedResult"
}
}
},
"result.validNewResult": {
"type": "object",
"required": [
"ConfigSnapshots",
"ScenarioID"
],
"properties": {
"ConfigSnapshots": {
"type": "string"
},
"Description": {
"type": "string"
},
"ResultFileIDs": {
"type": "array",
"items": {
"type": "integer"
}
},
"ScenarioID": {
"type": "integer"
}
}
},
"result.validUpdatedResult": {
"type": "object",
"properties": {
"configSnapshots": {
"type": "string"
},
"description": {
"type": "string"
},
"resultFileIDs": {
"type": "array",
"items": {
"type": "integer"
}
}
}
},
"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"
},
"ScalingFactor": {
"type": "number"
},
"Unit": {
"type": "string"
}
}
},
"signal.validUpdatedSignal": {
"type": "object",
"properties": {
"Index": {
"type": "integer"
},
"Name": {
"type": "string"
},
"ScalingFactor": {
"type": "number"
},
"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"
}
}
}
},
"securityDefinitions": {
"Bearer": {
"type": "apiKey",
"name": "Authorization",
"in": "header"
}
}
}`
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{
Version: "2.0",
Host: "",
BasePath: "/api/v2",
Schemes: []string{},
Title: "VILLASweb Backend API",
Description: "This is the [VILLASweb Backend](https://git.rwth-aachen.de/acs/public/villas/web-backend-go) API v2.0.\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.\nAuthentication: Use the authenticate endpoint below to obtain a token for your user account, copy the token into to the value field of the dialog showing up for the green Authorize button below and confirm with Done.",
}
type s struct{}
func (s *s) ReadDoc() string {
sInfo := SwaggerInfo
sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1)
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, sInfo); err != nil {
return doc
}
return tpl.String()
}
func init() {
swag.Register(swag.Name, &s{})
}