-
Notifications
You must be signed in to change notification settings - Fork 3
fix: Get the name of the board #56
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1669,3 +1669,24 @@ components: | |
| version: | ||
| type: string | ||
| type: object | ||
|
|
||
|
|
||
| /v1/system/name: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It might be better to use a more generic endpoint like /v1/system/information. If you only need to retrieve the system name, you could either include a query parameter filter (e.g. ?filter=name) or use a more specific endpoint such as |
||
| get: | ||
| description: Returns the name of the board. | ||
| operationId: getBoardName | ||
| responses: | ||
| "200": | ||
| content: | ||
| application/json: | ||
| schema: | ||
| properties: | ||
| name: | ||
| type: string | ||
| type: object | ||
| description: Successful response | ||
| "500": | ||
| $ref: '#/components/responses/InternalServerError' | ||
| summary: Get the board's name | ||
| tags: | ||
| - System | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the
openapi.yamlfile is generated fromcmd/gendoc/docs.gofile.You have to add your definition programmatically.
You can take inspiration from:
arduino-app-cli/cmd/gendoc/docs.go
Lines 795 to 825 in 5a33829
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lucarin91 perhaps would be better to go back to spec first approach, to ease future contributions?