Skip to content

ecoutu/eco-json-schema-form

Repository files navigation

eco-json-schema-form

Polymer 1.0 JSON Schema form builder

Description

This repository provides elements that take in a JSON schema and generates a DOM tree of inputs linked to the object described by the schema.

See the component page for more information.

TODO:

  • Being able to set an initial value (eg, providing an instance of the schema for modification) - currently only supports new instances
  • Create an element that provides a single entry point, so there is no need to choose between <eco-json-schema-object> and <eco-json-schema-array>
  • Specifying which fields to show

Supported

type: number

  • multipleOf
  • maximum
  • exclusiveMaximum
  • minimum
  • exclusiveMinimum

type: string

  • maxLength
  • minLength
  • pattern

type: array

  • items - object
  • items - array
  • additionalItems - boolean
  • additionalItems - object
  • maxItems
  • minItems
  • uniqueItems

type: object

  • maxProperties
  • minProperties
  • required
  • additionalProperties - boolean
  • additionalProperties - object
  • properties
  • patternProperties
  • dependencies, value is an object
  • dependencies, value is an array

misc

  • enum - number / integer
  • enum - string
  • enum - array
  • enum - object
  • allOf
  • anyOf
  • oneOf
  • not
  • definitions
  • title
  • description
  • default
  • format - date-time
  • format - email
  • format - hostname
  • format - ipv4
  • format - ipv6
  • format - uri