aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSun Howwrongbum <sun@adrenosapient.com>2016-12-06 03:14:27 +0530
committerSun Howwrongbum <sun@adrenosapient.com>2016-12-06 03:14:27 +0530
commitb7083d62bae0675e2f3e4009e6794460554352d6 (patch)
tree93cfcd915cbb60465684715913fc9ff5608be62c
parenta6989526efdd3d6a1af87270647ace0dc9a4c798 (diff)
downloadtrackermap-server-b7083d62bae0675e2f3e4009e6794460554352d6.tar.gz
trackermap-server-b7083d62bae0675e2f3e4009e6794460554352d6.tar.bz2
trackermap-server-b7083d62bae0675e2f3e4009e6794460554352d6.zip
[swagger] Update the rest of /devices
-rw-r--r--swagger.json77
1 files changed, 20 insertions, 57 deletions
diff --git a/swagger.json b/swagger.json
index 354544084..61ebf62e7 100644
--- a/swagger.json
+++ b/swagger.json
@@ -76,12 +76,7 @@
}
},
"post": {
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
+ "summary": "Create a Device",
"parameters": [
{
"name": "body",
@@ -95,7 +90,6 @@
"responses": {
"200": {
"description": "OK",
- "headers": {},
"schema": {
"$ref": "#/definitions/Device"
}
@@ -105,18 +99,10 @@
},
"/devices/{id}": {
"put": {
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
+ "summary": "Update a Device",
"parameters": [
{
- "name": "id",
- "in": "path",
- "required": true,
- "type": "integer"
+ "$ref": "#/parameters/entityId"
},
{
"name": "body",
@@ -130,7 +116,6 @@
"responses": {
"200": {
"description": "OK",
- "headers": {},
"schema": {
"$ref": "#/definitions/Device"
}
@@ -138,42 +123,25 @@
}
},
"delete": {
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
+ "summary": "Update a Device",
"parameters": [
{
- "name": "id",
- "in": "path",
- "required": true,
- "type": "integer"
+ "$ref": "#/parameters/entityId"
}
],
"responses": {
"204": {
- "description": "No Content",
- "headers": {}
+ "description": "No Content"
}
}
}
},
"/devices/{id}/distance": {
"put": {
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
+ "summary": "Update the distance counter of the Device",
"parameters": [
{
- "name": "id",
- "in": "path",
- "required": true,
- "type": "integer"
+ "$ref": "#/parameters/entityId"
},
{
"name": "body",
@@ -186,20 +154,14 @@
],
"responses": {
"204": {
- "description": "No Content",
- "headers": {}
+ "description": "No Content"
}
}
}
},
"/devices/geofences": {
"post": {
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
+ "summary": "Link a Geofence to a Device",
"parameters": [
{
"name": "body",
@@ -213,7 +175,6 @@
"responses": {
"200": {
"description": "OK",
- "headers": {},
"schema": {
"$ref": "#/definitions/DeviceGeofence"
}
@@ -221,12 +182,7 @@
}
},
"delete": {
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
+ "summary": "Remove a Geofence from a Device",
"parameters": [
{
"name": "body",
@@ -239,8 +195,7 @@
],
"responses": {
"204": {
- "description": "No Content",
- "headers": {}
+ "description": "No Content"
}
}
}
@@ -1946,5 +1901,13 @@
}
}
}
+ },
+ "parameters": {
+ "entityId": {
+ "name": "id",
+ "in": "path",
+ "required": true,
+ "type": "integer"
+ }
}
}