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 /apps/:id/bricks must return the same response as /apps/:id/bricks/:id #167

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

Merged
dido18 merged 9 commits into main from fix-app-bricks
Dec 17, 2025

Conversation

@dido18
Copy link
Contributor

@dido18 dido18 commented Dec 17, 2025
edited
Loading

Motivation

The Applab expcts that the GET /v1/apps/:id/bricks and GET v1/apps/:id/bricks/:id return the same JSON response.

Current

arduino@dido:/$ curl 127.0.0.1:8800/v1/apps/ZXhhbXBsZXM6cmVhbC10aW1lLWFjY2VsZXJvbWV0ZXI/bricks | jq
{
 "bricks": [
 {
 "id": "arduino:web_ui",
 "name": "WebUI - HTML",
 "author": "Arduino",
 "category": "ui",
 "status": "installed",
 "require_model": false
 },
 {
 "id": "arduino:motion_detection",
 "name": "Motion detection",
 "author": "Arduino",
 "category": "",
 "status": "installed",
 "require_model": true
 }
 ]
}

Change description

Use the same struct for both endpoints.

New response

curl 127.0.0.1:8800/v1/apps/ZXhhbXBsZXM6cmVhbC10aW1lLWFjY2VsZXJvbWV0ZXI/bricks 
{
 "bricks": [
 {
 "id": "arduino:web_ui",
 "name": "WebUI - HTML",
 "author": "Arduino",
 "category": "ui",
 "status": "installed",
 "require_model": false,
 "compatible_models": []
 },
 {
 "id": "arduino:motion_detection",
 "name": "Motion detection",
 "author": "Arduino",
 "category": "",
 "status": "installed",
 "require_model": true,
 "model": "updown-wave-motion-detection",
 "compatible_models": [
 {
 "id": "updown-wave-motion-detection",
 "name": "Continuous motion detection",
 "description": "A motion detection model designed to identify up/down, wave, and snake movements evalauting accelerometer data."
 }
 ]
 }
 ]
}

Additional Notes

Reviewer checklist

  • PR addresses a single concern.
  • PR title and description are properly filled.
  • Changes will be merged in main.
  • Changes are covered by tests.
  • Logging is meaningful in case of troubleshooting.

@dido18 dido18 requested a review from a team December 17, 2025 13:59
@dido18 dido18 changed the title (削除) Fix: get /apps/:id/bricks must reutns the compatiable modeld and the model selected (削除ここまで) (追記) Fix: get /apps/:id/bricks must retuns the same response of /apps/:id/bricks/:id (追記ここまで) Dec 17, 2025
dido18 and others added 2 commits December 17, 2025 15:17
Co-authored-by: Luca Rinaldi <l.rinaldi@arduino.cc>
Co-authored-by: Luca Rinaldi <l.rinaldi@arduino.cc>
Co-authored-by: Luca Rinaldi <l.rinaldi@arduino.cc>
@davegarthsimpson davegarthsimpson changed the title (削除) Fix: get /apps/:id/bricks must retuns the same response of /apps/:id/bricks/:id (削除ここまで) (追記) Fix: get /apps/:id/bricks must return the same response as /apps/:id/bricks/:id (追記ここまで) Dec 17, 2025
@dido18 dido18 merged commit 19c9d62 into main Dec 17, 2025
6 checks passed
@dido18 dido18 deleted the fix-app-bricks branch December 17, 2025 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@lucarin91 lucarin91 lucarin91 approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /