Skip to content

[breaking] Remove url and checksum attributes from ToolPayload endpoint #817

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions design/pkgs.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ var IndexPayload = Type("arduino.index", func() {
})

var ToolPayload = Type("arduino.tool", func() {
Description(`A tool is an executable program that can upload sketches.
If url is absent the tool will be searched among the package index installed`)
Description("A tool is an executable program that can upload sketches.")
TypeName("ToolPayload")

Attribute("name", String, "The name of the tool", func() {
Expand All @@ -118,13 +117,6 @@ var ToolPayload = Type("arduino.tool", func() {
Attribute("packager", String, "The packager of the tool", func() {
Example("arduino")
})

Attribute("url", String, `The url where the package can be found. Optional.
If present checksum must also be present.`)

Attribute("checksum", String, `A checksum of the archive. Mandatory when url is present.
This ensures that the package is downloaded correcly.`)

Required("name", "version", "packager")
})

Expand Down
13 changes: 3 additions & 10 deletions gen/http/cli/arduino_create_agent/cli.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gen/http/openapi.json

Large diffs are not rendered by default.

60 changes: 18 additions & 42 deletions gen/http/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ paths:
type: array
items:
type: string
example: Repudiandae dignissimos consectetur eos molestiae culpa soluta.
example: Pariatur laudantium inventore qui.
"400":
description: Bad Request response.
schema:
Expand Down Expand Up @@ -153,11 +153,6 @@ paths:
description: The version of the tool
required: true
type: string
- name: RemoveRequestBody
in: body
required: true
schema:
$ref: '#/definitions/ToolsRemoveRequestBody'
responses:
"200":
description: OK response.
Expand Down Expand Up @@ -193,14 +188,14 @@ definitions:
timeout:
type: boolean
description: Is the error a timeout?
example: false
example: true
description: url invalid (default view)
example:
fault: false
id: 123abc
message: parameter 'p' must be an integer
name: bad_request
temporary: false
temporary: true
timeout: false
required:
- name
Expand Down Expand Up @@ -241,7 +236,7 @@ definitions:
fault:
type: boolean
description: Is the error a server-side fault?
example: true
example: false
id:
type: string
description: ID is a unique identifier for this particular occurrence of the problem.
Expand All @@ -261,14 +256,14 @@ definitions:
timeout:
type: boolean
description: Is the error a timeout?
example: false
example: true
description: url invalid (default view)
example:
fault: true
fault: false
id: 123abc
message: parameter 'p' must be an integer
name: bad_request
temporary: true
temporary: false
timeout: true
required:
- name
Expand All @@ -284,7 +279,7 @@ definitions:
fault:
type: boolean
description: Is the error a server-side fault?
example: false
example: true
id:
type: string
description: ID is a unique identifier for this particular occurrence of the problem.
Expand All @@ -300,19 +295,19 @@ definitions:
temporary:
type: boolean
description: Is the error temporary?
example: true
example: false
timeout:
type: boolean
description: Is the error a timeout?
example: true
example: false
description: url invalid (default view)
example:
fault: false
fault: true
id: 123abc
message: parameter 'p' must be an integer
name: bad_request
temporary: true
timeout: false
timeout: true
required:
- name
- id
Expand Down Expand Up @@ -374,10 +369,6 @@ definitions:
title: ToolsInstallRequestBody
type: object
properties:
checksum:
type: string
description: "A checksum of the archive. Mandatory when url is present. \n\tThis ensures that the package is downloaded correcly."
example: Totam cum inventore exercitationem in.
name:
type: string
description: The name of the tool
Expand All @@ -386,19 +377,13 @@ definitions:
type: string
description: The packager of the tool
example: arduino
url:
type: string
description: "The url where the package can be found. Optional. \n\tIf present checksum must also be present."
example: Totam vero ipsum corporis nihil voluptatem id.
version:
type: string
description: The version of the tool
example: 6.3.0-arduino9
example:
checksum: Modi dolorem reprehenderit perspiciatis illo aspernatur.
name: avrdude
packager: arduino
url: Officia optio inventore atque in voluptatibus qui.
version: 6.3.0-arduino9
required:
- name
Expand All @@ -417,21 +402,6 @@ definitions:
status: ok
required:
- status
ToolsRemoveRequestBody:
title: ToolsRemoveRequestBody
type: object
properties:
checksum:
type: string
description: "A checksum of the archive. Mandatory when url is present. \n\tThis ensures that the package is downloaded correcly."
example: Et qui id et cumque illo.
url:
type: string
description: "The url where the package can be found. Optional. \n\tIf present checksum must also be present."
example: Officia maiores reiciendis est nemo.
example:
checksum: Corporis eum et numquam sapiente.
url: Est voluptatem eos reprehenderit quo sint quod.
ToolsRemoveResponseBody:
title: 'Mediatype identifier: application/vnd.arduino.operation; view=default'
type: object
Expand All @@ -458,3 +428,9 @@ definitions:
- name: avrdude
packager: arduino
version: 6.3.0-arduino9
- name: avrdude
packager: arduino
version: 6.3.0-arduino9
- name: avrdude
packager: arduino
version: 6.3.0-arduino9
2 changes: 1 addition & 1 deletion gen/http/openapi3.json

Large diffs are not rendered by default.

59 changes: 12 additions & 47 deletions gen/http/openapi3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,17 @@ paths:
type: array
items:
type: string
example: Eveniet iure nihil optio qui.
example: Rerum et soluta laudantium.
example:
- Et perferendis eveniet voluptas.
- Ut aut illum eaque dolor magni.
- Amet illo veritatis laudantium optio.
- Et deserunt.
- Impedit iusto libero explicabo.
- Dolor adipisci nulla.
- Quam voluptas voluptates expedita rem ipsum.
example:
- Illo enim vero qui rerum ut inventore.
- Dolorem nihil autem minima alias.
- Dignissimos consectetur eos molestiae culpa soluta deserunt.
- Nobis sint dolorem unde.
- Quia doloremque.
- Atque iusto tempore sit quod dolor repellat.
"400":
description: 'invalid_url: url invalid'
content:
Expand Down Expand Up @@ -152,10 +155,8 @@ paths:
schema:
$ref: '#/components/schemas/InstallRequestBody'
example:
checksum: Beatae dolor adipisci nulla et quam voluptas.
name: avrdude
packager: arduino
url: Deserunt voluptatem impedit iusto libero.
version: 6.3.0-arduino9
responses:
"200":
Expand Down Expand Up @@ -200,15 +201,6 @@ paths:
description: The version of the tool
example: 6.3.0-arduino9
example: 6.3.0-arduino9
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/RemoveRequestBody'
example:
checksum: Ipsa minima quia.
url: Expedita rem ipsum quasi harum nostrum.
responses:
"200":
description: OK response.
Expand Down Expand Up @@ -277,7 +269,7 @@ components:
temporary:
type: boolean
description: Is the error temporary?
example: false
example: true
timeout:
type: boolean
description: Is the error a timeout?
Expand All @@ -288,8 +280,8 @@ components:
id: 123abc
message: parameter 'p' must be an integer
name: bad_request
temporary: false
timeout: true
temporary: true
timeout: false
required:
- name
- id
Expand All @@ -300,10 +292,6 @@ components:
InstallRequestBody:
type: object
properties:
checksum:
type: string
description: "A checksum of the archive. Mandatory when url is present. \n\tThis ensures that the package is downloaded correcly."
example: Sint odio sed consequatur numquam.
name:
type: string
description: The name of the tool
Expand All @@ -312,19 +300,13 @@ components:
type: string
description: The packager of the tool
example: arduino
url:
type: string
description: "The url where the package can be found. Optional. \n\tIf present checksum must also be present."
example: Et quo doloremque sapiente atque.
version:
type: string
description: The version of the tool
example: 6.3.0-arduino9
example:
checksum: Mollitia commodi sunt.
name: avrdude
packager: arduino
url: Quae reprehenderit provident provident debitis illo.
version: 6.3.0-arduino9
required:
- name
Expand All @@ -341,20 +323,6 @@ components:
status: ok
required:
- status
RemoveRequestBody:
type: object
properties:
checksum:
type: string
description: "A checksum of the archive. Mandatory when url is present. \n\tThis ensures that the package is downloaded correcly."
example: Ea culpa.
url:
type: string
description: "The url where the package can be found. Optional. \n\tIf present checksum must also be present."
example: Odit officiis illo qui quia provident illo.
example:
checksum: Rerum eum esse corporis ex.
url: Molestiae dolor quaerat enim.
ToolCollection:
type: array
items:
Expand All @@ -369,9 +337,6 @@ components:
- name: avrdude
packager: arduino
version: 6.3.0-arduino9
- name: avrdude
packager: arduino
version: 6.3.0-arduino9
tags:
- name: indexes
description: The indexes service manages the package_index files
Expand Down
Loading