-
Notifications
You must be signed in to change notification settings - Fork 7
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
Allow port types to be specified using json-schema #15
Comments
Yes, we need richer type information and JSON schema seems a nice fit. I think that we should split the schema definition and usage of the schema however. So instead of Optionally one could allow adding to the schema like max/min constraints. There is the |
For the suffix, isn't it better to be able to specify a 'unit' ? |
I think better to provide the schema as a URL, like we did in noflo/noflo#551 The consumer can then fetch the schema as needed. This way there is no need to duplicate (potentially) large data structures across multiple components sharing the schema, and schema can also be carried as a metadata on packets/IIPs so it can be used not only for generating input widgets, but also for richer visualization |
To indicate the format of data sent/received on the port Fixes #15
To indicate the format of data sent/received on the port Fixes #15
As a user of a UI that is compatible with fbp-protocol such as noflo-ui, I want UI widgets with finer grained controls to make my life easier.
I propose that we expand the definition of our port types to allow json schema documents so that developers can use this to provide a better UX for users.
We currently support enums and defaults.
For starters, I would like to add things like:
[<input>]
MB)As well as the ability to reinterpret a base datatype with a more specific widget. For example:
Here is an example sub-document for an integer port:
Notes:
Other advantages:
object
type, but unfortunately, since the UI knows nothing of an object's schema, it can't provide a proper UI or validation. With json-schema, runtimes can provide more information for these compound types and noflo-ui can build appropriate UIs.Related issues:
The text was updated successfully, but these errors were encountered: