Advertising a flexible jsonschema form framework
Closed this issue · 1 comments
Hi,
I recently published a middlewares driven jsonschema form framework, which I think might be something you will be interested in.
The core can be found (here)[https://github.com/gravel-form/gravel].
I was a react-jsonschema-form
contributor and I found it's hard to customized. And also people came up with different requirments making the solution over complex. Inspired by expressjs, I came up with this middleware solution.
And I built antd
and blueprintjs
form on top of it
https://github.com/gravel-form/antd-form
https://github.com/gravel-form/blueprintjs-form
The idea is everything are middlewares, including submit buttons, validation, form controls and templates, or if you like, the form itself can be one of the middlewares. So people can achieve async validation, choose a different validator, add more json schema keyword support, by simple adding or replacing middlewares.
There are not coupling between middlewares, so removing them from the list wouldn't break the form but just make it having less features, which is good for testing and iterative development. Developers can also publish their middleware individually.
Here is an example to demonstrate how simple it is to add grid support.
Unfortunately, I'm no longer using jsonschema form so I'm not able to verify this solution in production environment. The project originally was prove of concept and practicing typescript, since the outcome was beyond my expectation, so I decided to push it a little bit further.
It will be great if I can get some feedback.
Best regards
@knilink this is interesting. There's been some issues with the duplication of code across themes in react-jsonschema-form (all widgets and templates need to be rewritten for each theme). I wonder if this could be accomplished through a "middleware"-like approach as you do in gravel-from?