Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
shanaya-Gupta wants to merge1 commit intoarduino:main
base:main
Choose a base branch
Loading
fromshanaya-Gupta:fix-55

Conversation

@shanaya-Gupta
Copy link

Fix for Issue#55

Issue: Get the name of the board

Changes:

  • Modified:internal/api/api.go,internal/api/docs/openapi.yaml

Please review carefully before merging.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign ourContributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let usrecheck it.

@per1234per1234 added the enhancementNew feature or request labelNov 9, 2025
type:object


/v1/system/name:
Copy link
Contributor

Choose a reason for hiding this comment

The 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.
This would make the API more cohesive and easier to extend in the future if new properties are added that still fall under the general “information” category.

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/v1/system/information/name.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

theopenapi.yaml file is generated fromcmd/gendoc/docs.go file.

You have to add your definition programmatically.

You can take inspiration from:

'data: {"code":"INTERNAL_SERVER_ERROR","message":"An error occurred during operation"}'
`,
},
Description:"Returns the system resources usage, such as memory, disk and CPU.",
Summary:"Get system resources usage",
Tags: []Tag{SystemTag},
PossibleErrors: []ErrorResponse{
{StatusCode:http.StatusInternalServerError,Reference:"#/components/responses/InternalServerError"},
},
},
{
OperationId:"checkUpdate",
Method:http.MethodGet,
Path:"/v1/system/update/check",
Parameters: (*struct {
OnlyArduinobool`query:"only-arduino" description:"If true, check only for Arduino packages that require an upgrade. Default is false."`
})(nil),
CustomSuccessResponse:&CustomResponseDef{
ContentType:"application/json",
DataStructure: handlers.UpdateCheckResult{},
Description:"Successful response",
StatusCode:http.StatusOK,
},
Description:"Returns the details of packages to be upgraded.",
Summary:"Get the packages that requires an upgrade",
Tags: []Tag{SystemTag},
PossibleErrors: []ErrorResponse{
{StatusCode:http.StatusInternalServerError,Reference:"#/components/responses/InternalServerError"},
{StatusCode:http.StatusBadRequest,Reference:"#/components/responses/BadRequest"},
{StatusCode:http.StatusNoContent,Reference:"#/components/responses/NoContent"},
},

Copy link
Contributor

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?

lucarin91 reacted with confused emoji
@lucarin91lucarin91 marked this pull request as draftNovember 10, 2025 11:08
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

1 more reviewer

@alessio-peruginialessio-peruginialessio-perugini left review comments

Reviewers whose approvals may not affect merge requirements

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

enhancementNew feature or request

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@shanaya-Gupta@CLAassistant@alessio-perugini@per1234

[8]ページ先頭

©2009-2025 Movatter.jp