1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-06 03:50:04 +02:00

cleaned up per vbanthia's comments. fixed docs to align with implementation

This commit is contained in:
kris 2017-06-14 21:38:09 -05:00
parent eb069bbdf3
commit 9f3f0b9692
3 changed files with 8 additions and 21 deletions

View file

@ -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)

View file

@ -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:

View file

@ -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"
],