From 360269eb2e32f8177d3c759ccbd3a72ac8964d81 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 2 May 2016 17:11:33 +1200 Subject: Update swagger documentation file --- swagger.json | 225 ++++++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 209 insertions(+), 16 deletions(-) diff --git a/swagger.json b/swagger.json index f8269a2da..12b5020c7 100644 --- a/swagger.json +++ b/swagger.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "3.3", + "version": "3.5", "title": "traccar" }, "host": "traccar.org", @@ -159,7 +159,180 @@ } } }, - "/permissions": { + "/groups": { + "get": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "all", + "in": "query", + "required": true, + "type": "boolean" + }, + { + "name": "userId", + "in": "query", + "required": true, + "type": "integer" + } + ], + "responses": { + "200": { + "description": "OK", + "headers": {}, + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Group" + } + } + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Group" + } + } + ], + "responses": { + "200": { + "description": "OK", + "headers": {}, + "schema": { + "$ref": "#/definitions/Group" + } + } + } + } + }, + "/groups/{id}": { + "put": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "type": "integer" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Group" + } + } + ], + "responses": { + "200": { + "description": "OK", + "headers": {}, + "schema": { + "$ref": "#/definitions/Group" + } + } + } + }, + "delete": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "type": "integer" + } + ], + "responses": { + "204": { + "description": "No Content", + "headers": {} + } + } + } + }, + "/permissions/devices": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/DevicePermission" + } + } + ], + "responses": { + "200": { + "description": "OK", + "headers": {}, + "schema": { + "$ref": "#/definitions/DevicePermission" + } + } + } + }, + "delete": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/DevicePermission" + } + } + ], + "responses": { + "204": { + "description": "No Content", + "headers": {} + } + } + } + }, + "/permissions/groups": { "post": { "consumes": [ "application/json" @@ -173,7 +346,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/Permission" + "$ref": "#/definitions/GroupPermission" } } ], @@ -182,7 +355,7 @@ "description": "OK", "headers": {}, "schema": { - "$ref": "#/definitions/Permission" + "$ref": "#/definitions/GroupPermission" } } } @@ -200,7 +373,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/Permission" + "$ref": "#/definitions/GroupPermission" } } ], @@ -556,13 +729,7 @@ "password": { "type": "string" }, - "hashedPassword": { - "type": "string" - }, - "salt": { - "type": "string" - }, - "passwordValid": { + "twelveHourFormat": { "type": "boolean" } } @@ -587,9 +754,6 @@ "mapUrl": { "type": "string" }, - "language": { - "type": "string" - }, "distanceUnit": { "type": "string" }, @@ -604,6 +768,9 @@ }, "zoom": { "type": "number" + }, + "twelveHourFormat": { + "type": "boolean" } } }, @@ -629,10 +796,26 @@ }, "positionId": { "type": "number" + }, + "groupId": { + "type": "number" + } + } + }, + "Group": { + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "groupId": { + "type": "number" } } }, - "Permission": { + "DevicePermission": { "properties": { "userId": { "type": "number" @@ -641,6 +824,16 @@ "type": "number" } } + }, + "GroupPermission": { + "properties": { + "userId": { + "type": "number" + }, + "groupId": { + "type": "number" + } + } } } } -- cgit v1.2.3