diff --git a/doc/API.md b/doc/API.md index ee2318b2..203ae6b7 100644 --- a/doc/API.md +++ b/doc/API.md @@ -287,7 +287,7 @@ POST /api/v1/user/devices/{serial}/remoteConnect Using cURL: ```bash -curl -X POST --header "Content-Type: application/json" -H "Authorization: Bearer YOUR-TOKEN-HERE" https://stf.example.org/api/v1/user/devices/{serial}/remoteConnect +curl -X POST -H "Authorization: Bearer YOUR-TOKEN-HERE" https://stf.example.org/api/v1/user/devices/{serial}/remoteConnect ``` Using Node.js: @@ -384,7 +384,7 @@ function add_device function remote_connect { - response=$(curl -X POST -H "Content-Type: application/json" \ + response=$(curl -X POST \ -H "Authorization: Bearer $STF_TOKEN" \ $STF_URL/api/v1/user/devices/$DEVICE_SERIAL/remoteConnect) @@ -404,7 +404,7 @@ function remote_connect function remove_device { - response=$(curl -X DELETE -H "Content-Type: application/json" \ + response=$(curl -X DELETE \ -H "Authorization: Bearer $STF_TOKEN" \ $STF_URL/api/v1/user/devices/$DEVICE_SERIAL) diff --git a/lib/units/api/swagger/api_v1.yaml b/lib/units/api/swagger/api_v1.yaml index c14cf2e8..99d621d6 100644 --- a/lib/units/api/swagger/api_v1.yaml +++ b/lib/units/api/swagger/api_v1.yaml @@ -1,6 +1,6 @@ swagger: "2.0" info: - version: "2.0.1" + version: "2.3.0" title: Smartphone Test Farm description: Control and manages real Smartphone devices from browser and restful apis license: @@ -16,6 +16,7 @@ schemes: - https consumes: - application/json + - application/octet-stream produces: - application/json tags: @@ -124,8 +125,6 @@ paths: summary: Delete User Device description: The User Devices endpoint will request for device release from stf server. It will return request accepted if device is being used by current user operationId: deleteUserDeviceBySerial - consumes: - - application/octet-stream tags: - user parameters: @@ -151,8 +150,6 @@ paths: summary: Remote Connect description: The device connect endpoint will request stf server to connect remotely operationId: remoteConnectUserDeviceBySerial - consumes: - - application/octet-stream tags: - user parameters: @@ -176,8 +173,6 @@ paths: summary: Remote Disconnect description: The device connect endpoint will request stf server to disconnect remotely operationId: remoteDisconnectUserDeviceBySerial - consumes: - - application/octet-stream tags: - user parameters: diff --git a/lib/units/api/swagger/api_v1_generated.json b/lib/units/api/swagger/api_v1_generated.json index fee18791..f384ed19 100644 --- a/lib/units/api/swagger/api_v1_generated.json +++ b/lib/units/api/swagger/api_v1_generated.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "2.0.1", + "version": "2.3.0", "title": "Smartphone Test Farm", "description": "Control and manages real Smartphone devices from browser and restful apis", "license": { @@ -20,7 +20,8 @@ "https" ], "consumes": [ - "application/json" + "application/json", + "application/octet-stream" ], "produces": [ "application/json" @@ -189,9 +190,6 @@ "summary": "Delete User Device", "description": "The User Devices endpoint will request for device release from stf server. It will return request accepted if device is being used by current user", "operationId": "deleteUserDeviceBySerial", - "consumes": [ - "application/octet-stream" - ], "tags": [ "user" ], @@ -228,9 +226,6 @@ "summary": "Remote Connect", "description": "The device connect endpoint will request stf server to connect remotely", "operationId": "remoteConnectUserDeviceBySerial", - "consumes": [ - "application/octet-stream" - ], "tags": [ "user" ], @@ -267,9 +262,6 @@ "summary": "Remote Disconnect", "description": "The device connect endpoint will request stf server to disconnect remotely", "operationId": "remoteDisconnectUserDeviceBySerial", - "consumes": [ - "application/octet-stream" - ], "tags": [ "user" ],