Skip to content

Commit

Permalink
Merge pull request #199 from TheTransitClock/tc_issue_198
Browse files Browse the repository at this point in the history
Update traccar swagger file to latest version.
  • Loading branch information
scrudden committed Jun 22, 2020
2 parents 9e2e648 + 316b12c commit b0b8aec
Showing 1 changed file with 198 additions and 20 deletions.
218 changes: 198 additions & 20 deletions transitclockTraccarClient/src/main/resources/swagger.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"swagger": "2.0",
"info": {
"version": "3.15",
"version": "4.8",
"title": "traccar"
},
"host": "demo.traccar.org",
Expand Down Expand Up @@ -168,11 +168,22 @@
{
"name": "deviceId",
"in": "query",
"description" : "Internal device identifier. Only works if device has already reported some locations",
"required" : false,
"type": "integer"
},
{
"name": "protocol",
"in": "query",
"description" : "Protocol name. Can be used instead of device id",
"required" : false,
"type": "string"
},
{
"name": "textChannel",
"in": "query",
"description" : "When `true` return SMS commands. If not specified or `false` return data commands",
"required" : false,
"type": "boolean"
}
],
Expand Down Expand Up @@ -286,9 +297,9 @@
}
}
},
"/devices/{id}/distance": {
"/devices/{id}/accumulators": {
"put": {
"summary": "Update the distance counter of the Device",
"summary": "Update total distance and hours of the Device",
"parameters": [
{
"$ref": "#/parameters/entityId"
Expand All @@ -298,7 +309,7 @@
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/DeviceTotalDistance"
"$ref": "#/definitions/DeviceAccumulators"
}
}
],
Expand Down Expand Up @@ -1350,6 +1361,90 @@
}
}
}
},
"/maintenance": {
"get": {
"summary": "Fetch a list of Maintenance",
"description": "Without params, it returns a list of Maintenance 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/Maintenance"
}
}
}
}
},
"post": {
"summary": "Create a Maintenance",
"parameters": [
{
"$ref": "#/parameters/Maintenance"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/Maintenance"
}
}
}
}
},
"/maintenance/{id}": {
"put": {
"summary": "Update a Maintenance",
"parameters": [
{
"$ref": "#/parameters/entityId"
},
{
"$ref": "#/parameters/Maintenance"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/Maintenance"
}
}
}
},
"delete": {
"summary": "Delete a Maintenance",
"parameters": [
{
"$ref": "#/parameters/entityId"
}
],
"responses": {
"204": {
"description": "No Content"
}
}
}
}
},
"definitions": {
Expand Down Expand Up @@ -1408,9 +1503,13 @@
"type": "number"
},
"network": {
"type": "string"
"type": "object",
"additionalProperties": true
},
"attributes": {}
"attributes": {
"type": "object",
"additionalProperties": true
}
}
},
"User": {
Expand All @@ -1427,7 +1526,7 @@
"readonly": {
"type": "boolean"
},
"admin": {
"administrator": {
"type": "boolean"
},
"map": {
Expand Down Expand Up @@ -1471,10 +1570,16 @@
"limitCommands": {
"type": "boolean"
},
"poiLayer": {
"type": "string"
},
"token": {
"type": "string"
},
"attributes": {}
"attributes": {
"type": "object",
"additionalProperties": true
}
}
},
"Server": {
Expand Down Expand Up @@ -1503,6 +1608,9 @@
"mapUrl": {
"type": "string"
},
"poiLayer": {
"type": "string"
},
"latitude": {
"type": "number"
},
Expand All @@ -1524,7 +1632,10 @@
"coordinateFormat": {
"type": "string"
},
"attributes": {}
"attributes": {
"type": "object",
"additionalProperties": true
}
}
},
"Command": {
Expand All @@ -1541,7 +1652,10 @@
"type": {
"type": "string"
},
"attributes": {}
"attributes": {
"type": "object",
"additionalProperties": true
}
}
},
"Device": {
Expand All @@ -1558,6 +1672,9 @@
"status": {
"type": "string"
},
"disabled": {
"type": "boolean"
},
"lastUpdate": {
"type": "string",
"format": "date-time",
Expand Down Expand Up @@ -1587,7 +1704,10 @@
"type": "integer"
}
},
"attributes": {}
"attributes": {
"type": "object",
"additionalProperties": true
}
}
},
"Group": {
Expand All @@ -1601,7 +1721,10 @@
"groupId": {
"type": "integer"
},
"attributes": {}
"attributes": {
"type": "object",
"additionalProperties": true
}
}
},
"Permission": {
Expand All @@ -1624,7 +1747,7 @@
"type": "integer"
},
"calendarId": {
"description": "Geofence Id, can be second parameter only and only in combination with userId",
"description": "Calendar Id, can be second parameter only and only in combination with userId",
"type": "integer"
},
"attributeId": {
Expand Down Expand Up @@ -1665,7 +1788,10 @@
"calendarId": {
"type": "integer"
},
"attributes": {}
"attributes": {
"type": "object",
"additionalProperties": true
}
}
},
"Notification": {
Expand All @@ -1688,7 +1814,13 @@
"sms": {
"type": "boolean"
},
"attributes": {}
"calendarId": {
"type": "integer"
},
"attributes": {
"type": "object",
"additionalProperties": true
}
}
},
"NotificationType": {
Expand Down Expand Up @@ -1720,7 +1852,13 @@
"geofenceId": {
"type": "integer"
},
"attributes": {}
"maintenanceId": {
"type": "integer"
},
"attributes": {
"type": "object",
"additionalProperties": true
}
}
},
"ReportSummary": {
Expand Down Expand Up @@ -1878,14 +2016,17 @@
}
}
},
"DeviceTotalDistance": {
"DeviceAccumulators": {
"properties": {
"deviceId": {
"type": "integer"
},
"totalDistance": {
"type": "number",
"description": "in meters"
},
"hours": {
"type": "number"
}
}
},
Expand All @@ -1901,7 +2042,10 @@
"type": "string",
"description": "base64 encoded in iCalendar format"
},
"atributes": {}
"attributes": {
"type": "object",
"additionalProperties": true
}
}
},
"Attribute": {
Expand Down Expand Up @@ -1935,7 +2079,33 @@
"uniqueId": {
"type": "string"
},
"atributes": {}
"attributes": {
"type": "object",
"additionalProperties": true
}
}
},
"Maintenance": {
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"start": {
"type": "number"
},
"period": {
"type": "number"
},
"attributes": {
"type": "object",
"additionalProperties": true
}
}
}
},
Expand Down Expand Up @@ -2056,6 +2226,14 @@
"$ref": "#/definitions/Notification"
}
},
"Maintenance": {
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Maintenance"
}
},
"deviceIdArray": {
"name": "deviceId",
"in": "query",
Expand Down Expand Up @@ -2097,4 +2275,4 @@
"description": "Basic HTTP authorization with _email_ and _password_"
}
}
}
}

0 comments on commit b0b8aec

Please sign in to comment.