diff options
author | Abyss777 <abyss@fox5.ru> | 2017-07-24 11:28:14 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2017-07-24 11:44:42 +0500 |
commit | d54ea579899e7d03a3065fbc3e119ca4e676696a (patch) | |
tree | 362f5b5cbe68611716f781616f2ebdb2a686c9b1 /swagger.json | |
parent | f57b2094210de3de6f7333fd5169b8218478f8f9 (diff) | |
download | trackermap-server-d54ea579899e7d03a3065fbc3e119ca4e676696a.tar.gz trackermap-server-d54ea579899e7d03a3065fbc3e119ca4e676696a.tar.bz2 trackermap-server-d54ea579899e7d03a3065fbc3e119ca4e676696a.zip |
Add Drivers to swagger
Diffstat (limited to 'swagger.json')
-rw-r--r-- | swagger.json | 121 |
1 files changed, 117 insertions, 4 deletions
diff --git a/swagger.json b/swagger.json index 970052e79..fcc9f5153 100644 --- a/swagger.json +++ b/swagger.json @@ -613,10 +613,7 @@ "$ref": "#/parameters/groupId" }, { - "name": "refresh", - "in": "query", - "required": false, - "type": "boolean" + "$ref": "#/parameters/refresh" } ], "responses": { @@ -1052,6 +1049,9 @@ { "$ref": "#/parameters/groupId" }, + { + "$ref": "#/parameters/refresh" + } ], "responses": { "200": { @@ -1115,6 +1115,90 @@ } } } + }, + "/drivers": { + "get": { + "summary": "Fetch a list of Drivers", + "description": "Without params, it returns a list of Drivers the user has access to", + "parameters": [ + { + "$ref": "#/parameters/all" + }, + { + "$ref": "#/parameters/userId" + }, + { + "$ref": "#/parameters/deviceId" + }, + { + "$ref": "#/parameters/groupId" + }, + { + "$ref": "#/parameters/refresh" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Driver" + } + } + } + } + }, + "post": { + "summary": "Create a Driver", + "parameters": [ + { + "$ref": "#/parameters/Driver" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Driver" + } + } + } + } + }, + "/drivers/{id}": { + "put": { + "summary": "Update a Driver", + "parameters": [ + { + "$ref": "#/parameters/entityId" + }, + { + "$ref": "#/parameters/Driver" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Driver" + } + } + } + }, + "delete": { + "summary": "Delete a Driver", + "parameters": [ + { + "$ref": "#/parameters/entityId" + } + ], + "responses": { + "204": { + "description": "No Content" + } + } + } } }, "definitions": { @@ -1638,6 +1722,20 @@ "description": "String|Number|Boolean" } } + }, + "Driver": { + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "uniqueId": { + "type": "string" + }, + "atributes": {} + } } }, "parameters": { @@ -1653,6 +1751,13 @@ "description": "Can only be used by admins or managers to fetch all entities", "type": "boolean" }, + { + "refresh": { + "name": "refresh", + "in": "query", + "required": false, + "type": "boolean" + }, "userId": { "name": "userId", "in": "query", @@ -1735,6 +1840,14 @@ "$ref": "#/definitions/Attribute" } }, + "Driver": { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Driver" + } + }, "deviceIdArray": { "name": "deviceId", "in": "query", |