DiamondLightSource / DiamondLightSource/blueapi
Add limits, default values, resolution and control hint fields to the enhanced JSONSchema parameters for plans
- Dominant language
- Python
- Stars
- 13
- Forks
- 13
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 25
Description
For the enumerated version of the /plans and /plans{name} endpoints (see #518 ), extra contextual fields should be added to the properties describing each plan parameter to support validation when used by UI generation systems liike JSONForms. These should include at least:
- minimum and/or maximum values for numerical quantities where appropriate
- default values for all types where appropriate
- resolution valuies for numerical quantities where appropriate - e,g. when changing floating point values, the minimum step a UI should support
- multiple selection indication for lists of options e.g. to indicate its is valid to select more than one detector
This will support validation of submitted parameters by User interfaces improving the feedback in the user experience and preventing the submission of invalid requests to execute the plan. It could be argued that these should be added to existing version of the endpoints too, as this would alloe the CLI to support such validation too, but I am leaving that as a decision to be discussed.
Contributor guide
Assessment
This issue has not been assessed yet.