mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-22 00:35:15 +02:00
Merge pull request #601 from kwv/fixes-594
Fixes 594 -- Allows default content-type (application/octet-stream) on path based parameter operations
This commit is contained in:
@@ -287,7 +287,7 @@ POST /api/v1/user/devices/{serial}/remoteConnect
|
|||||||
Using cURL:
|
Using cURL:
|
||||||
|
|
||||||
```bash
|
```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:
|
Using Node.js:
|
||||||
@@ -384,7 +384,7 @@ function add_device
|
|||||||
|
|
||||||
function remote_connect
|
function remote_connect
|
||||||
{
|
{
|
||||||
response=$(curl -X POST -H "Content-Type: application/json" \
|
response=$(curl -X POST \
|
||||||
-H "Authorization: Bearer $STF_TOKEN" \
|
-H "Authorization: Bearer $STF_TOKEN" \
|
||||||
$STF_URL/api/v1/user/devices/$DEVICE_SERIAL/remoteConnect)
|
$STF_URL/api/v1/user/devices/$DEVICE_SERIAL/remoteConnect)
|
||||||
|
|
||||||
@@ -404,7 +404,7 @@ function remote_connect
|
|||||||
|
|
||||||
function remove_device
|
function remove_device
|
||||||
{
|
{
|
||||||
response=$(curl -X DELETE -H "Content-Type: application/json" \
|
response=$(curl -X DELETE \
|
||||||
-H "Authorization: Bearer $STF_TOKEN" \
|
-H "Authorization: Bearer $STF_TOKEN" \
|
||||||
$STF_URL/api/v1/user/devices/$DEVICE_SERIAL)
|
$STF_URL/api/v1/user/devices/$DEVICE_SERIAL)
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
swagger: "2.0"
|
swagger: "2.0"
|
||||||
info:
|
info:
|
||||||
version: "2.0.0"
|
version: "2.3.0"
|
||||||
title: Smartphone Test Farm
|
title: Smartphone Test Farm
|
||||||
description: Control and manages real Smartphone devices from browser and restful apis
|
description: Control and manages real Smartphone devices from browser and restful apis
|
||||||
license:
|
license:
|
||||||
@@ -16,6 +16,7 @@ schemes:
|
|||||||
- https
|
- https
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
- application/octet-stream
|
||||||
produces:
|
produces:
|
||||||
- application/json
|
- application/json
|
||||||
tags:
|
tags:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"swagger": "2.0",
|
"swagger": "2.0",
|
||||||
"info": {
|
"info": {
|
||||||
"version": "2.0.0",
|
"version": "2.3.0",
|
||||||
"title": "Smartphone Test Farm",
|
"title": "Smartphone Test Farm",
|
||||||
"description": "Control and manages real Smartphone devices from browser and restful apis",
|
"description": "Control and manages real Smartphone devices from browser and restful apis",
|
||||||
"license": {
|
"license": {
|
||||||
@@ -20,7 +20,8 @@
|
|||||||
"https"
|
"https"
|
||||||
],
|
],
|
||||||
"consumes": [
|
"consumes": [
|
||||||
"application/json"
|
"application/json",
|
||||||
|
"application/octet-stream"
|
||||||
],
|
],
|
||||||
"produces": [
|
"produces": [
|
||||||
"application/json"
|
"application/json"
|
||||||
@@ -37,6 +38,7 @@
|
|||||||
],
|
],
|
||||||
"paths": {
|
"paths": {
|
||||||
"/user": {
|
"/user": {
|
||||||
|
"x-swagger-router-controller": "user",
|
||||||
"get": {
|
"get": {
|
||||||
"summary": "User Profile",
|
"summary": "User Profile",
|
||||||
"description": "The User Profile endpoint returns information about current authorized user",
|
"description": "The User Profile endpoint returns information about current authorized user",
|
||||||
@@ -66,6 +68,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/user/devices": {
|
"/user/devices": {
|
||||||
|
"x-swagger-router-controller": "user",
|
||||||
"get": {
|
"get": {
|
||||||
"summary": "User Devices",
|
"summary": "User Devices",
|
||||||
"description": "The User Devices endpoint returns device list owner by current authorized user",
|
"description": "The User Devices endpoint returns device list owner by current authorized user",
|
||||||
@@ -139,6 +142,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/user/devices/{serial}": {
|
"/user/devices/{serial}": {
|
||||||
|
"x-swagger-router-controller": "user",
|
||||||
"get": {
|
"get": {
|
||||||
"summary": "User Device",
|
"summary": "User Device",
|
||||||
"description": "The devices enpoint return information about device owned by user",
|
"description": "The devices enpoint return information about device owned by user",
|
||||||
@@ -217,6 +221,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/user/devices/{serial}/remoteConnect": {
|
"/user/devices/{serial}/remoteConnect": {
|
||||||
|
"x-swagger-router-controller": "user",
|
||||||
"post": {
|
"post": {
|
||||||
"summary": "Remote Connect",
|
"summary": "Remote Connect",
|
||||||
"description": "The device connect endpoint will request stf server to connect remotely",
|
"description": "The device connect endpoint will request stf server to connect remotely",
|
||||||
@@ -288,6 +293,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/user/accessTokens": {
|
"/user/accessTokens": {
|
||||||
|
"x-swagger-router-controller": "user",
|
||||||
"get": {
|
"get": {
|
||||||
"summary": "Access Tokens",
|
"summary": "Access Tokens",
|
||||||
"description": "The Access Tokens endpoints returns titles of all the valid access tokens",
|
"description": "The Access Tokens endpoints returns titles of all the valid access tokens",
|
||||||
@@ -317,6 +323,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/devices": {
|
"/devices": {
|
||||||
|
"x-swagger-router-controller": "devices",
|
||||||
"get": {
|
"get": {
|
||||||
"summary": "Device List",
|
"summary": "Device List",
|
||||||
"description": "The devices endpoint return list of all the STF devices including Disconnected and Offline",
|
"description": "The devices endpoint return list of all the STF devices including Disconnected and Offline",
|
||||||
@@ -355,6 +362,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/devices/{serial}": {
|
"/devices/{serial}": {
|
||||||
|
"x-swagger-router-controller": "devices",
|
||||||
"get": {
|
"get": {
|
||||||
"summary": "Device Information",
|
"summary": "Device Information",
|
||||||
"description": "The device enpoint return information about a single device",
|
"description": "The device enpoint return information about a single device",
|
||||||
@@ -399,7 +407,9 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/swagger.json": {}
|
"/swagger.json": {
|
||||||
|
"x-swagger-pipe": "swagger_raw"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"definitions": {
|
"definitions": {
|
||||||
"UserResponse": {
|
"UserResponse": {
|
||||||
|
|||||||
Reference in New Issue
Block a user