mirror of
https://github.com/openstf/stf
synced 2025-10-04 18:29:17 +02:00
User path parameter for Delete /user/devices/:device endpoint
This commit is contained in:
parent
bca180d284
commit
c9a9d3cb06
2 changed files with 7 additions and 14 deletions
|
@ -97,7 +97,7 @@ function addDeviceToUser(req, res) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteDeviceFromUser(req, res) {
|
function deleteDeviceFromUser(req, res) {
|
||||||
var serial = req.body.serial
|
var serial = req.swagger.params.serial.value
|
||||||
|
|
||||||
dbapi.loadDevice(serial)
|
dbapi.loadDevice(serial)
|
||||||
.then(function(device) {
|
.then(function(device) {
|
||||||
|
|
|
@ -84,6 +84,8 @@ paths:
|
||||||
$ref: "#/definitions/ErrorResponse"
|
$ref: "#/definitions/ErrorResponse"
|
||||||
security:
|
security:
|
||||||
- accessTokenAuth: []
|
- accessTokenAuth: []
|
||||||
|
/user/devices/{serial}:
|
||||||
|
x-swagger-router-controller: user
|
||||||
delete:
|
delete:
|
||||||
summary: Release device from user
|
summary: Release device from user
|
||||||
description: The User Devices endpoint will request for device release from stf server.
|
description: The User Devices endpoint will request for device release from stf server.
|
||||||
|
@ -91,12 +93,11 @@ paths:
|
||||||
tags:
|
tags:
|
||||||
- user
|
- user
|
||||||
parameters:
|
parameters:
|
||||||
- name: device
|
- name: serial
|
||||||
in: body
|
in: path
|
||||||
description: Device to add
|
description: Device Serial
|
||||||
required: true
|
required: true
|
||||||
schema:
|
type: string
|
||||||
$ref: "#/definitions/DeviceDeletePayload"
|
|
||||||
responses:
|
responses:
|
||||||
"202":
|
"202":
|
||||||
description: Device Release Request Status
|
description: Device Release Request Status
|
||||||
|
@ -222,14 +223,6 @@ definitions:
|
||||||
timeout:
|
timeout:
|
||||||
description: Device timeout in ms. If device is kept idle for this period, it will be automatically disconnected. Default is provider group timeout.
|
description: Device timeout in ms. If device is kept idle for this period, it will be automatically disconnected. Default is provider group timeout.
|
||||||
type: integer
|
type: integer
|
||||||
DeviceDeletePayload:
|
|
||||||
description: payload object for deleting device from user
|
|
||||||
required:
|
|
||||||
- serial
|
|
||||||
properties:
|
|
||||||
serial:
|
|
||||||
description: Device Serial
|
|
||||||
type: string
|
|
||||||
|
|
||||||
securityDefinitions:
|
securityDefinitions:
|
||||||
accessTokenAuth:
|
accessTokenAuth:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue