-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add limits, default values, resolution and control hint fields to the enhanced JSONSchema parameters for plans #519
Comments
The first 3 bullet points will have to be user-specified in the plan signature somehow, the fourth is a bit separate and possibly warrants slitting out into its own issue. |
I think it's usually just a case of adding "uniqueItems": true to any arrays so may also be able to be user specified, or be based on the type of the param? |
The canonical way to do this is to put |
Bullet number 1 should be on the Device in question IMO, because it is a property of the signal
So plan field would have to become something approximating |
@DiamondJoseph I think that's some very complicated validation, and maybe we just provide a hook for it and say "if you want that level of validation, you need to write your own code" |
I agree, but limits are not really a property of a plan. |
Why not? Maybe not motor limits, but there are other use cases of needing to define arbitrary limits on plan parameters (e.g. this must be positive etc.) The question is how we tie some specific parameters to motors |
I think "number must be positive", "list must have at least 1 element" are all validation and sensible to be properties of plans (and simply to accomplish with |
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:
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.
The text was updated successfully, but these errors were encountered: