diff options
author | Sun Howwrongbum <sun@adrenosapient.com> | 2016-12-06 04:02:07 +0530 |
---|---|---|
committer | Sun Howwrongbum <sun@adrenosapient.com> | 2016-12-06 04:02:07 +0530 |
commit | ec535ff33ee8b2c2b3635a8d373ae37d358af18e (patch) | |
tree | cc91eaf6a95522a492be5d65e553d537514d792a | |
parent | e37f4e08d751b083c97ce44aae47f08b5fd04f46 (diff) | |
download | trackermap-server-ec535ff33ee8b2c2b3635a8d373ae37d358af18e.tar.gz trackermap-server-ec535ff33ee8b2c2b3635a8d373ae37d358af18e.tar.bz2 trackermap-server-ec535ff33ee8b2c2b3635a8d373ae37d358af18e.zip |
[swagger] Describe /positions, /server, ...
... /session
-rw-r--r-- | swagger.json | 81 |
1 files changed, 29 insertions, 52 deletions
diff --git a/swagger.json b/swagger.json index ae273ce5e..a4ff0d0f6 100644 --- a/swagger.json +++ b/swagger.json @@ -452,13 +452,7 @@ "/positions": { "get": { "summary" : "Fetches a list of Positions", - "description" : "Without any params, it returns a list of last known positions for all the user's devices", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], + "description" : "Without any params, it returns a list of last known positions for all the user's Devices. _from_ and _to_ fields are not required with _id_", "parameters": [ { "name": "deviceId", @@ -468,19 +462,12 @@ "type": "integer" }, { - "name": "from", - "in": "query", - "description": "Not required with _id_", - "required": false, - "type": "string" + "$ref": "#/parameters/fromTime" + }, + { + "$ref": "#/parameters/toTime" }, { - "name": "to", - "in": "query", - "description": "Not required with _id_", - "required": false, - "type": "string" - }, { "name" : "id", "in" : "query", "description" : "To fetch one or more positions. Multiple params can be passed like `id=31&id=42`", @@ -504,17 +491,10 @@ }, "/server": { "get": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "parameters": [], + "summary": "Fetch Server information", "responses": { "200": { "description": "OK", - "headers": {}, "schema": { "$ref": "#/definitions/Server" } @@ -522,12 +502,7 @@ } }, "put": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], + "summary": "Update Server information", "parameters": [ { "name": "body", @@ -541,7 +516,6 @@ "responses": { "200": { "description": "OK", - "headers": {}, "schema": { "$ref": "#/definitions/Server" } @@ -551,34 +525,27 @@ }, "/session": { "get": { + "summary": "Fetch Session information", "consumes": [ "application/x-www-form-urlencoded" ], - "produces": [ - "application/json" - ], - "parameters": [], "responses": { "200": { "description": "OK", - "headers": {}, "schema": { "$ref": "#/definitions/User" } }, "404": { - "description": "Not Found", - "headers": {} + "description": "Not Found" } } }, "post": { + "summary": "Create a new Session", "consumes": [ "application/x-www-form-urlencoded" ], - "produces": [ - "application/json" - ], "parameters": [ { "name": "email", @@ -590,35 +557,31 @@ "name": "password", "in": "formData", "required": true, - "type": "string" + "type": "string", + "format": "password" } ], "responses": { "200": { "description": "OK", - "headers": {}, "schema": { "$ref": "#/definitions/User" } }, "401": { - "description": "Unauthorized", - "headers": {} + "description": "Unauthorized" } } }, "delete": { + "summary": "Close the Session", "consumes": [ "application/x-www-form-urlencoded" ], - "produces": [ - "application/json" - ], "parameters": [], "responses": { "204": { - "description": "No Content", - "headers": {} + "description": "No Content" } } } @@ -1837,6 +1800,20 @@ "in": "query", "description": "Standard users can use this with their only with their own _userId_", "type": "integer" + }, + "fromTime": { + "name": "from", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + "toTime": { + "name": "to", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" } } } |