Code Monkey home page Code Monkey logo

json-schema-form-generator-es6's Introduction

json-schema-form-generator

A tool to generate json schema forms

Travis build status Code Climate Test Coverage Dependency Status devDependency Status

Objective

The goal for this libary is to provide a generator that will allow users of json-schema-form to generate form definitions through various means. This is the base package and will provide translations of simple data into json-schema-form syntax. It will also import json-schema-form definitions and return it in a format that can be used with the GUI.

Installation

npm install json-schema-generator

Usage

The generator accepts standard json schema form schema and form as input and will output json schema form schema, form and model that use jsf to edit the form definition.

var jsonSchemaFormGenerator = require('json-schema-generator').default;
generator = jsonSchemaFormGenerator.getFormBuilder(schema, form);

In html:

<div sf-schema="generator.schema" sf-form="generator.form" sf-model="generator.model"></div>

To get the form definitions, simply call getDefinitions with the model as parameter

var output = jsonSchemaFormGenerator.getDefinitions(generator.model);

In html, you can then show the form like any standard json schema form:

<div sf-schema="output.schema" sf-form="ouput.form"></div>  

NB: The examples use the angular-builder, however the generator is framework agnostic and uses plain javascript. Adapters for different frameworks are required for drop-in usage.

Todo

  • Support the full json schema form definition
    • Enum and Titlemaps
    • Fields without keys
    • All Json Schema Draft 4 keywords
    • Fields with items
  • Unit tests
  • Framework adapters
    • Angular Directive

json-schema-form-generator-es6's People

Contributors

rowino avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.