Skip to content

Instantly share code, notes, and snippets.

@mathis-m
Created October 8, 2021 14:04
Show Gist options
  • Save mathis-m/f422e4791161f31d994046c780f31e8f to your computer and use it in GitHub Desktop.
Save mathis-m/f422e4791161f31d994046c780f31e8f to your computer and use it in GitHub Desktop.
{
"basePath": "/",
"info": {
"title": "My api",
"version": "1.0.0"
},
"paths": {
"/controller/": {
"get": {
"operationId": "apiGetControllers",
"tags": [
"Controller"
],
"description": "Test",
"responses": {
"200": {
"description": "Ok"
}
},
"produces": [
"application/json"
],
"consumes": [
"application/json"
]
}
},
"/controller/create": {
"post": {
"operationId": "apiCreateController",
"tags": [
"Controller"
],
"description": "Creates a Controller",
"consumes": [
"application/json"
],
"parameters": [
{
"name": "body",
"in": "body",
"schema": {
"$ref": "#/definitions/ControllerCreateInput"
}
}
],
"responses": {
"200": {
"description": "Ok"
}
},
"produces": [
"application/json"
]
}
}
},
"tags": [
{
"name": "Controller"
}
],
"schemes": [
"http"
],
"produces": [
"application/json"
],
"consumes": [
"application/json"
],
"definitions": {
"ControllerConfigCreateInput": {
"type": "object",
"properties": {
"role": {
"type": "string",
"description": "Controllers Role"
},
"group": {
"type": "integer",
"description": "Controllers Group"
}
},
"required": [
],
"description": "Attributes for creating a Controller Configuration"
},
"ControllerCreateInput": {
"type": "object",
"properties": {
"device_ip": {
"type": "string",
"description": "Device's IP Adress"
},
"device_name": {
"type": "string",
"description": "Name of the Device"
},
"description": {
"type": "string",
"description": "Device's description"
},
"configuration": {
"type": "object",
"description": "Device's Configuration",
"$ref": "#/definitions/ControllerConfigCreateInput"
}
},
"required": [
"device_ip",
"device_name",
"configuration"
],
"description": "Attributes for creating a Controller"
}
},
"swagger": "2.0"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment