Add UI schema to task discovery response to help frontend build forms
koonpeng opened this issue · 0 comments
koonpeng commented
Feature request
Description
Regarding this issue about validating tasks open-rmf/rmf-web#684. Afaik, there are several blockers for us to resolve it.
- The rmf task discovery endpoint is not implemented yet
- The task discovery uses json schema to describe the params of a task
- Problem is that json schema is very powerful/flexible, I have tried building a form from json schema before but there are too many features which makes the whole process super complicated.
- There are some similar OSS projects like https://jsonforms.io/ and https://github.com/rjsf-team/react-jsonschema-form, but they require a ui schema to be written beforehand so it won't quite work for our case. Given that this is the approach they use, my conclusion is that going from json schema -> ui forms directly is actually a very complex challenge.
My proposal is to have task discovery contain both the json schema and a ui schema, with this, we can build forms for any tasks and validate them.