Skip to content

Conversation

@mirkoCrobu
Copy link
Contributor

Motivation

closes #92

Align the GET /v1/bricks/{id} response with the config_variables refactored here #18.

deprecate the variables field returned as a map of object
add config_variables field as an array of objects

Change description

curl 127.0.0.1:8800/v1/bricks/arduino:visual_anomaly_detection
{
  "id": "arduino:visual_anomaly_detection",
  "name": "Visual Anomaly Detection",
  "author": "Arduino",
  "description": "",
  "category": "image",
  "status": "installed",
  "require_model": true,
 // Depreacted
  "variables": {
    "CUSTOM_MODEL_PATH": {
      "default_value": "/home/arduino/.arduino-bricks/ei-models",
      "description": "path to the custom model directory",
      "required": false
    },
    "EI_V_ANOMALY_DETECTION_MODEL": {
      "default_value": "/models/ootb/ei/concrete-crack-anomaly-detection.eim",
      "description": "path to the model file",
      "required": false
    }
 // Added
 "config_variables": [
    {
      "name": "CUSTOM_MODEL_PATH",
      "default_value": "/home/arduino/.arduino-bricks/ei-models",
      "description": "path to the custom model directory",
      "required": false
    },
    {
      "name": "EI_OBJ_DETECTION_MODEL",
      "default_value": "/models/ootb/ei/yolo-x-nano.eim",
      "description": "path to the model file",
      "required": false
    }
  ],
  },

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.

@mirkoCrobu mirkoCrobu requested a review from a team December 1, 2025 11:09
@mirkoCrobu mirkoCrobu self-assigned this Dec 1, 2025
Copy link
Contributor

@dido18 dido18 left a comment

Choose a reason for hiding this comment

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

LGTM

@mirkoCrobu mirkoCrobu merged commit a7317dc into main Dec 1, 2025
6 checks passed
@mirkoCrobu mirkoCrobu deleted the issue_92_add_config_variables_field_brick_details branch December 1, 2025 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

api: change the GET /v1/bricks/{id} variables field

2 participants