TimesysGit / board-farm-rest-api

A community-driven open specification for standardizing board farm API
https://elinux.org/Board_Farm_REST_API
MIT License
6 stars 1 forks source link

Many specs don't specify the 'message' field in the response object #13

Open tbird20d opened 3 years ago

tbird20d commented 3 years ago

For the device status field, one possible field in the return message (according to the 'ebf' client code) is "message". However, this field is not specified in spec/device_management/device_status.yaml.

There appear to be many files which 'ebf' expects to return a "message" field on error, but which do not have this in their spec file.

Here are some I found:

ebf does not use these apis: /api/v0.2/device/{DeviceName}/status/ /api/v0.2/device/{DeviceName}/webcam/restartfeed /api/v0.2/device/{DeviceName}/image/capture

So I could not verify if these are intended to have a 'message' field or not.

I think it would be good to have all message specs include the 'message' field, and have the convention be that if there's a bad result, then the message field has the error message (or reason why). This appears to be how ebf is using this field.

harishbansal commented 3 years ago

message fields included in response definitions [see pull request] (https://github.com/TimesysGit/board-farm-rest-api/pull/15)

ebf does not use these apis: /api/v0.2/device/{DeviceName}/status/ /api/v0.2/device/{DeviceName}/webcam/restartfeed /api/v0.2/device/{DeviceName}/image/capture

Task added on the embedded boardfarm project to standardize above APIs and add its support in ebf-cli tool.

harishbansal commented 3 years ago

standardized specs for below api: /api/v0.2/device/{DeviceName}/status/ /api/v0.2/device/{DeviceName}/webcam/restartfeed /api/v0.2/device/{DeviceName}/image/capture

Pending: