Modify APIs from Aysnc -> Sync using timeout

This commit is contained in:
Vishal Banthia
2015-12-14 14:02:20 +09:00
parent d67d06a19f
commit a6266931ad
10 changed files with 354 additions and 239 deletions

View File

@@ -46,7 +46,7 @@ paths:
/user/devices:
x-swagger-router-controller: user
get:
summary: List devices owned by current user
summary: User Devices
description: The User Devices endpoint returns device list owner by current authorized user
operationId: getUserDevices
tags:
@@ -70,22 +70,20 @@ paths:
- accessTokenAuth: []
post:
summary: Add a device to a user
description: The User Devices endpoint will request stf server for a new device. It will return request accepted if device is usable
description: The User Devices endpoint will request stf server for a new device.
operationId: addUserDevice
tags:
- user
parameters:
- name: devices
- name: device
in: body
description: Device to add
required: true
schema:
$ref: "#/definitions/AddUserDevicePayload"
responses:
"202":
description: Add User Device Request Status and polling Url
schema:
$ref: "#/definitions/AddUserDeviceResponse"
"200":
description: Add User Device Status
default:
description: Unexpected Error
schema:
@@ -95,8 +93,8 @@ paths:
/user/devices/{serial}:
x-swagger-router-controller: user
get:
summary: Device Information
description: The device enpoint return information about device owned by user
summary: User Device
description: The devices enpoint return information about device owned by user
operationId: getUserDeviceBySerial
tags:
- user
@@ -113,9 +111,9 @@ paths:
type: string
responses:
"200":
description: Delete User Device Request Status and polling Url
description: Device Information owned by user
schema:
$ref: "#/definitions/DeleteUserDeviceBySerialResponse"
$ref: "#/definitions/DeviceResponse"
default:
description: Unexpected Error
schema:
@@ -123,7 +121,7 @@ paths:
security:
- accessTokenAuth: []
delete:
summary: Release device from user
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
tags:
@@ -135,8 +133,8 @@ paths:
required: true
type: string
responses:
"202":
description: Device Release Request Status
"200":
description: Delete User Device Status
default:
description: Unexpected Error
schema:
@@ -160,7 +158,7 @@ paths:
required: true
type: string
responses:
"202":
"200":
description: Remote Connect User Device Request Status
schema:
$ref: "#/definitions/RemoteConnectUserDeviceResponse"
@@ -183,10 +181,8 @@ paths:
required: true
type: string
responses:
"202":
"200":
description: Remote Disonnect User Device Request Status
schema:
$ref: "#/definitions/RemoteDisconnectUserDeviceResponse"
default:
description: Unexpected Error
schema:
@@ -194,7 +190,7 @@ paths:
security:
- accessTokenAuth: []
/user/accessTokens:
x-swagger-router-controller: token
x-swagger-router-controller: user
get:
summary: Access Tokens
description: The Access Tokens endpoints returns titles of all the valid access tokens
@@ -298,35 +294,14 @@ definitions:
properties:
device:
type: object
AddUserDeviceResponse:
required:
- pollingUrl
properties:
pollingUrl:
type: string
DeleteUserDeviceBySerialResponse:
required:
- pollingUrl
properties:
pollingUrl:
type: string
RemoteDisconnectUserDeviceResponse:
required:
- pollingUrl
properties:
pollingUrl:
type: string
RemoteConnectUserDeviceResponse:
required:
- pollingUrl
- remoteConnectUrl
- serial
properties:
pollingUrl:
remoteConnectUrl:
type: string
ErrorResponse:
required:
- message
properties:
message:
serial:
type: string
AddUserDevicePayload:
description: payload object for adding device to user
@@ -339,7 +314,12 @@ definitions:
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
ErrorResponse:
required:
- message
properties:
message:
type: string
securityDefinitions:
accessTokenAuth:
type: apiKey