Show HN: Generate React forms from JSON form schemas
1–10 of 28 posts
Re: Show HN: Generate React forms from JSON form schemas
#2Re: Show HN: Generate React forms from JSON form schemas
#3Re: Show HN: Generate React forms from JSON form schemas
#4Re: Show HN: Generate React forms from JSON form schemas
#5We're currently using react-forms with a custom json-schema to react-forms schema conversion.
[1] https://github.com/gcanti/tcomb-form [2] https://github.com/gcanti/tcomb-json-schema
Re: Show HN: Generate React forms from JSON form schemas
#6See also tcomb-form [1] with it's tcomb-json-schema plugin [2]. We're currently using react-forms with a custom json-schema to react-forms schema conversion. [1] https://github.com/gcanti/tcomb-form [2] https://github.com/gcanti/tcomb-json-schema
Re: Show HN: Generate React forms from JSON form schemas
#7I would strongly recommend that anyone looking into something like this first look at JSON Schema[1], which is a pretty widely adopted standard. We're doing server and client validation with one set of rules, and there are lots of libraries that will clean up your data given a schema. [1] http://json-schema.org/examples.html
Re: Show HN: Generate React forms from JSON form schemas
#8I would strongly recommend that anyone looking into something like this first look at JSON Schema[1], which is a pretty widely adopted standard. We're doing server and client validation with one set of rules, and there are lots of libraries that will clean up your data given a schema. [1] http://json-schema.org/examples.html
On our backend we have a main service in Python and a few micro-services in Node. All of the JSON data flying between these services has JSON Schema definitions.
We've built some express.js and wsgi middleware so that for a given route you can specify "Requests to this endpoint should follow schema {} responses from this endpoint should follow schema {}." Our middleware then validates all requests and responses against these schema. This works really well for us.
Re: Show HN: Generate React forms from JSON form schemas
#9Re: Show HN: Generate React forms from JSON form schemas
#10I would strongly recommend that anyone looking into something like this first look at JSON Schema[1], which is a pretty widely adopted standard. We're doing server and client validation with one set of rules, and there are lots of libraries that will clean up your data given a schema. [1] http://json-schema.org/examples.html
What makes sense is extending JSON Schema with optional properties that fill in things JSON Schema doesn't provide yet make it work with nothing but a JSON Schema.
json-editor[1] does a very good job in this regard.
Libraries like these are repeating what people have done already previously (classic JS framework DRY problem). They will need to solve a lot of corner cases to mature. Recursion, oneOf and some other JSON Schema properties are pretty hard to implement.