JsonSchemaComponent demo
[link to this page]
This form is generated ..
.. from this:
Data
(synchronizes with the above form)
{ "ship_name": "Pequod", "abstract": "To seek out a specific whale", "revenge": true, "captain": "Ahab", "harpooneers": ["Queequeg", "Tashtego"], "arrival": "1820-11-20", "tags": ["ocean", "blue", "sea"] }
Schema
{ "name" : "Sea voyage form", "properties" : { "chapter" : { "type" : "string", "description" : "Current chapter (autocomplete)" }, "favorite_chapter" : { "type" : "integer", "description" : "Favorite chapter number", "minimum": 1, "maximum": 135 }, "ship_name" : { "type" : "string", "description" : "Ship name", "required" : true, "pattern": ".+" }, "abstract" : { "type" : "string", "description" : "Travel purpose (must contain the word 'whale')", "required": false, "pattern": "whale" }, "revenge" : { "description" : "Revenge ?", "type" : "boolean", "enum": [true] }, "captain" : { "description" : "Captain", "type" : "string", "enum" : ["Ahab", "Picard", "Han Solo", "Anakin Skywalker"] }, "departure": { "type": "time" }, "arrival": { "description": "Arrival", "type": "date" }, "tags": { "description" : "Tags for this journey", "type" : "array" }, "harpooneers" : { "description" : "Which Harpooneers do you like the most (choose 2 to 3)?", "type" : "array", "minItems": 2, "maxItems": 3, "items": { "type" : "string", "enum" : ["Queequeg", "Tashtego", "Daggoo", "Fedallah"] } } }, "links": [ { "rel": "chapter", "href": "http://www.mobydickthewhale.com/moby-dick/moby-dick-chapter-{chapter}.htm" } ] }
Template
JsonSchemaComponent on GitHub