Skip to content

Commit 28842c9

Browse files
authored
Clients update - April 24 (#85)
1 parent 138c42b commit 28842c9

File tree

5 files changed

+145
-12
lines changed

5 files changed

+145
-12
lines changed

config/languages/go_v2.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"gitRepoId": "iot-client-go",
44
"isGoSubmodule": false,
55
"packageName": "iot",
6-
"packageVersion": "2.0.1",
6+
"packageVersion": "2.0.2",
77
"withGoCodegenComment": true
88
}

config/languages/html2_v2.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"packageName": "iot",
3-
"packageVersion": "2.0.1",
3+
"packageVersion": "2.0.2",
44
"usePromises": true
55
}

config/languages/javascript_v2.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"projectName": "@arduino/arduino-iot-client",
33
"moduleName": "ArduinoIotClient",
4-
"projectVersion": "2.0.1",
5-
"packageVersion": "2.0.1",
4+
"projectVersion": "2.0.2",
5+
"packageVersion": "2.0.2",
66
"usePromises": true,
77
"licenseName":"GPLv3",
88
"generateSourceCodeOnly": true

config/languages/python_v2.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"packageName": "iot_api_client",
33
"projectName": "arduino-iot-client",
4-
"packageVersion": "2.0.1",
4+
"packageVersion": "2.0.2",
55
"generateSourceCodeOnly": false
66
}

spec/v2/swagger.yaml

Lines changed: 140 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ components:
44
description: Accepted
55
BadRequest:
66
description: Bad Request
7+
Conflict:
8+
description: Conflict
79
NotFound:
810
description: Not Found
911
NotImplemented:
@@ -315,6 +317,27 @@ components:
315317
title: 'Mediatype identifier: application/vnd.arduino.devicev2.event.properties+json;
316318
view=default'
317319
type: object
320+
ArduinoDevicev2Otaupload:
321+
description: ArduinoDevicev2Otaupload media type (default view)
322+
properties:
323+
file_sha:
324+
description: SHA256 of the uploaded file
325+
type: string
326+
ota_id:
327+
description: OTA request id (only available from OTA version 2 and above)
328+
type: string
329+
ota_version:
330+
description: OTA version
331+
format: int64
332+
type: integer
333+
status:
334+
description: OTA request status (only available from OTA version 2 and above)
335+
type: string
336+
required:
337+
- ota_version
338+
title: 'Mediatype identifier: application/vnd.arduino.devicev2.otaupload+json;
339+
view=default'
340+
type: object
318341
ArduinoDevicev2Pass:
319342
description: DeviceCertV2 describes a password associated to a device (default
320343
view)
@@ -1891,6 +1914,22 @@ components:
18911914
- binary_key
18921915
title: devicev2.otabinaryurl
18931916
type: object
1917+
devicev2.otaurlpyalod:
1918+
properties:
1919+
binary_key:
1920+
description: The object key of the binary
1921+
pattern: ^ota/[a-zA-Z0-9_-]+/[a-zA-Z0-9_-]+.ota$
1922+
type: string
1923+
sha256:
1924+
description: The sha256 of the binary
1925+
pattern: ^[a-fA-F0-9]{64}$
1926+
type: string
1927+
user_id:
1928+
description: The id of the user who is requesting the url
1929+
format: uuid
1930+
type: string
1931+
title: devicev2.otaurlpyalod
1932+
type: object
18941933
devicev2.pass:
18951934
properties:
18961935
password:
@@ -3781,6 +3820,99 @@ paths:
37813820
required:
37823821
- ota_file
37833822
type: object
3823+
responses:
3824+
"200":
3825+
content:
3826+
application/vnd.arduino.devicev2.otaupload+json:
3827+
schema:
3828+
$ref: '#/components/schemas/ArduinoDevicev2Otaupload'
3829+
application/vnd.goa.error+json:
3830+
schema:
3831+
$ref: '#/components/schemas/ArduinoDevicev2Otaupload'
3832+
description: OK
3833+
"202":
3834+
content:
3835+
application/vnd.arduino.devicev2.otaupload+json:
3836+
schema:
3837+
$ref: '#/components/schemas/ArduinoDevicev2Otaupload'
3838+
application/vnd.goa.error+json:
3839+
schema:
3840+
$ref: '#/components/schemas/ArduinoDevicev2Otaupload'
3841+
description: Accepted
3842+
"400":
3843+
content:
3844+
application/vnd.arduino.devicev2.otaupload+json:
3845+
schema:
3846+
$ref: '#/components/schemas/error'
3847+
application/vnd.goa.error+json:
3848+
schema:
3849+
$ref: '#/components/schemas/error'
3850+
description: Bad Request
3851+
"401":
3852+
description: Unauthorized
3853+
"404":
3854+
content:
3855+
application/vnd.arduino.devicev2.otaupload+json:
3856+
schema:
3857+
$ref: '#/components/schemas/error'
3858+
application/vnd.goa.error+json:
3859+
schema:
3860+
$ref: '#/components/schemas/error'
3861+
description: Not Found
3862+
"409":
3863+
description: Conflict
3864+
"410":
3865+
content:
3866+
application/vnd.arduino.devicev2.otaupload+json:
3867+
schema:
3868+
$ref: '#/components/schemas/error'
3869+
application/vnd.goa.error+json:
3870+
schema:
3871+
$ref: '#/components/schemas/error'
3872+
description: Gone
3873+
"412":
3874+
content:
3875+
application/vnd.arduino.devicev2.otaupload+json:
3876+
schema:
3877+
$ref: '#/components/schemas/error'
3878+
application/vnd.goa.error+json:
3879+
schema:
3880+
$ref: '#/components/schemas/error'
3881+
description: Precondition Failed
3882+
"500":
3883+
content:
3884+
application/vnd.arduino.devicev2.otaupload+json:
3885+
schema:
3886+
$ref: '#/components/schemas/error'
3887+
application/vnd.goa.error+json:
3888+
schema:
3889+
$ref: '#/components/schemas/error'
3890+
description: Internal Server Error
3891+
security:
3892+
- oauth2: []
3893+
summary: upload devices_v2_ota
3894+
tags:
3895+
- devices_v2_ota
3896+
put:
3897+
description: Send a binary url to a device
3898+
operationId: devices_v2_ota#send
3899+
parameters:
3900+
- description: The id of the device
3901+
in: path
3902+
name: id
3903+
required: true
3904+
schema:
3905+
type: string
3906+
requestBody:
3907+
content:
3908+
application/json:
3909+
schema:
3910+
$ref: '#/components/schemas/devicev2.otabinaryurl'
3911+
application/x-www-form-urlencoded:
3912+
schema:
3913+
$ref: '#/components/schemas/devicev2.otabinaryurl'
3914+
required: true
3915+
x-originalParamName: payload
37843916
responses:
37853917
"200":
37863918
description: OK
@@ -3835,12 +3967,13 @@ paths:
38353967
description: Internal Server Error
38363968
security:
38373969
- oauth2: []
3838-
summary: upload devices_v2_ota
3970+
summary: send devices_v2_ota
38393971
tags:
38403972
- devices_v2_ota
3841-
put:
3842-
description: Send a binary url to a device
3843-
operationId: devices_v2_ota#send
3973+
/v2/devices/{id}/ota/url:
3974+
post:
3975+
description: Generate a url for downloading a binary
3976+
operationId: devices_v2_ota#url
38443977
parameters:
38453978
- description: The id of the device
38463979
in: path
@@ -3852,10 +3985,10 @@ paths:
38523985
content:
38533986
application/json:
38543987
schema:
3855-
$ref: '#/components/schemas/devicev2.otabinaryurl'
3988+
$ref: '#/components/schemas/devicev2.otaurlpyalod'
38563989
application/x-www-form-urlencoded:
38573990
schema:
3858-
$ref: '#/components/schemas/devicev2.otabinaryurl'
3991+
$ref: '#/components/schemas/devicev2.otaurlpyalod'
38593992
required: true
38603993
x-originalParamName: payload
38613994
responses:
@@ -3912,7 +4045,7 @@ paths:
39124045
description: Internal Server Error
39134046
security:
39144047
- oauth2: []
3915-
summary: send devices_v2_ota
4048+
summary: url devices_v2_ota
39164049
tags:
39174050
- devices_v2_ota
39184051
/v2/devices/{id}/pass:

0 commit comments

Comments
 (0)