Skip to content

Commit

Permalink
Clients update - April 24 (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
rjtokenring authored Apr 16, 2024
1 parent 138c42b commit 28842c9
Show file tree
Hide file tree
Showing 5 changed files with 145 additions and 12 deletions.
2 changes: 1 addition & 1 deletion config/languages/go_v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"gitRepoId": "iot-client-go",
"isGoSubmodule": false,
"packageName": "iot",
"packageVersion": "2.0.1",
"packageVersion": "2.0.2",
"withGoCodegenComment": true
}
2 changes: 1 addition & 1 deletion config/languages/html2_v2.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"packageName": "iot",
"packageVersion": "2.0.1",
"packageVersion": "2.0.2",
"usePromises": true
}
4 changes: 2 additions & 2 deletions config/languages/javascript_v2.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"projectName": "@arduino/arduino-iot-client",
"moduleName": "ArduinoIotClient",
"projectVersion": "2.0.1",
"packageVersion": "2.0.1",
"projectVersion": "2.0.2",
"packageVersion": "2.0.2",
"usePromises": true,
"licenseName":"GPLv3",
"generateSourceCodeOnly": true
Expand Down
2 changes: 1 addition & 1 deletion config/languages/python_v2.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"packageName": "iot_api_client",
"projectName": "arduino-iot-client",
"packageVersion": "2.0.1",
"packageVersion": "2.0.2",
"generateSourceCodeOnly": false
}
147 changes: 140 additions & 7 deletions spec/v2/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ components:
description: Accepted
BadRequest:
description: Bad Request
Conflict:
description: Conflict
NotFound:
description: Not Found
NotImplemented:
Expand Down Expand Up @@ -315,6 +317,27 @@ components:
title: 'Mediatype identifier: application/vnd.arduino.devicev2.event.properties+json;
view=default'
type: object
ArduinoDevicev2Otaupload:
description: ArduinoDevicev2Otaupload media type (default view)
properties:
file_sha:
description: SHA256 of the uploaded file
type: string
ota_id:
description: OTA request id (only available from OTA version 2 and above)
type: string
ota_version:
description: OTA version
format: int64
type: integer
status:
description: OTA request status (only available from OTA version 2 and above)
type: string
required:
- ota_version
title: 'Mediatype identifier: application/vnd.arduino.devicev2.otaupload+json;
view=default'
type: object
ArduinoDevicev2Pass:
description: DeviceCertV2 describes a password associated to a device (default
view)
Expand Down Expand Up @@ -1891,6 +1914,22 @@ components:
- binary_key
title: devicev2.otabinaryurl
type: object
devicev2.otaurlpyalod:
properties:
binary_key:
description: The object key of the binary
pattern: ^ota/[a-zA-Z0-9_-]+/[a-zA-Z0-9_-]+.ota$
type: string
sha256:
description: The sha256 of the binary
pattern: ^[a-fA-F0-9]{64}$
type: string
user_id:
description: The id of the user who is requesting the url
format: uuid
type: string
title: devicev2.otaurlpyalod
type: object
devicev2.pass:
properties:
password:
Expand Down Expand Up @@ -3781,6 +3820,99 @@ paths:
required:
- ota_file
type: object
responses:
"200":
content:
application/vnd.arduino.devicev2.otaupload+json:
schema:
$ref: '#/components/schemas/ArduinoDevicev2Otaupload'
application/vnd.goa.error+json:
schema:
$ref: '#/components/schemas/ArduinoDevicev2Otaupload'
description: OK
"202":
content:
application/vnd.arduino.devicev2.otaupload+json:
schema:
$ref: '#/components/schemas/ArduinoDevicev2Otaupload'
application/vnd.goa.error+json:
schema:
$ref: '#/components/schemas/ArduinoDevicev2Otaupload'
description: Accepted
"400":
content:
application/vnd.arduino.devicev2.otaupload+json:
schema:
$ref: '#/components/schemas/error'
application/vnd.goa.error+json:
schema:
$ref: '#/components/schemas/error'
description: Bad Request
"401":
description: Unauthorized
"404":
content:
application/vnd.arduino.devicev2.otaupload+json:
schema:
$ref: '#/components/schemas/error'
application/vnd.goa.error+json:
schema:
$ref: '#/components/schemas/error'
description: Not Found
"409":
description: Conflict
"410":
content:
application/vnd.arduino.devicev2.otaupload+json:
schema:
$ref: '#/components/schemas/error'
application/vnd.goa.error+json:
schema:
$ref: '#/components/schemas/error'
description: Gone
"412":
content:
application/vnd.arduino.devicev2.otaupload+json:
schema:
$ref: '#/components/schemas/error'
application/vnd.goa.error+json:
schema:
$ref: '#/components/schemas/error'
description: Precondition Failed
"500":
content:
application/vnd.arduino.devicev2.otaupload+json:
schema:
$ref: '#/components/schemas/error'
application/vnd.goa.error+json:
schema:
$ref: '#/components/schemas/error'
description: Internal Server Error
security:
- oauth2: []
summary: upload devices_v2_ota
tags:
- devices_v2_ota
put:
description: Send a binary url to a device
operationId: devices_v2_ota#send
parameters:
- description: The id of the device
in: path
name: id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/devicev2.otabinaryurl'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/devicev2.otabinaryurl'
required: true
x-originalParamName: payload
responses:
"200":
description: OK
Expand Down Expand Up @@ -3835,12 +3967,13 @@ paths:
description: Internal Server Error
security:
- oauth2: []
summary: upload devices_v2_ota
summary: send devices_v2_ota
tags:
- devices_v2_ota
put:
description: Send a binary url to a device
operationId: devices_v2_ota#send
/v2/devices/{id}/ota/url:
post:
description: Generate a url for downloading a binary
operationId: devices_v2_ota#url
parameters:
- description: The id of the device
in: path
Expand All @@ -3852,10 +3985,10 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/devicev2.otabinaryurl'
$ref: '#/components/schemas/devicev2.otaurlpyalod'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/devicev2.otabinaryurl'
$ref: '#/components/schemas/devicev2.otaurlpyalod'
required: true
x-originalParamName: payload
responses:
Expand Down Expand Up @@ -3912,7 +4045,7 @@ paths:
description: Internal Server Error
security:
- oauth2: []
summary: send devices_v2_ota
summary: url devices_v2_ota
tags:
- devices_v2_ota
/v2/devices/{id}/pass:
Expand Down

0 comments on commit 28842c9

Please sign in to comment.