Lightweight form generator, using JSON Schema.
This is work in progress
This module generates form based on JSON Schema, its keywords are documented in this spec: http://json-schema.org/latest/json-schema-validation.html. It focuses on simplicity rather than completeness of JSON Schema spec coverage. For example, we don’t try to guess style of oneOf
.
View demo: https://json-tools.github.io/json-form/
Development progress:
undefined
(erase optional property)Next steps will be some of those (not necessarily in this order):
This module uses create-elm-app
in order to not clutter project with unrelated dependencies.
npm install -g create-elm-app
You may want to run local dev server to facilitate hot module reloading.
elm-app start
elm-app build
gh-pages -d build
A few notes on how json schema interpeted by form generator.
For the sake of simpliticy form generator uses a “type” keyword of JSON Schema in order to identify type of the field. When “type” keyword is an array or types or missing then value edited as json string. Boolean renders toggle, but can be customized to render a checkbox.
Title rendered as label for terminal input fields (leaf nodes of the value), and as h3 headers for objects.
Keyword required
of object type used to identify whether to display * near the label. Optional text fields also have button to erase value displayed.