e5d7ec71

JSON Schema form generator RenderJS gadget

Structure

Gadget for recursive load schema

gadget_erp5_page_slap_load_schema.html

  • done remove jquery dependence
  • support in $ref rfc6901

Gadget for recursive form generation

gadget_json_generated_form.html

  • done remove slapos specific code
  • done remove jquery dependence
  • partly done full support of json schema
  • done support in path rfc6901
  • using changeState and mutex
  • separate form design from code for form generation
  • add general using documentation

Gadget for generate slapos parameter form

gadget_erp5_page_slap_parameter_form.html

It is the previous version of gadget used for form generation. It should be changed for it uses the above gadget as children for form generation.

In this gadget the below listed specific slapos code should be saved:

  • gui for selection of software type and serialized format output
  • JsonDocument serialization to xml
  • JsonDocument converting to xml
  • downloading schema for user software type choice
  • text representation of form if intialJsonData is not valid for current schema
  • gui for switch to text mode custom JsonDocument input

JSON schema supported

Below is the list of JSON Schema validation properties and current supported status:

array

fixed rendering is not supported

  • additionalItems
    • rendering is not supported
  • items
    • union is not supported
  • maxItems
    • rendering is not supported
  • minItems
    • rendering is not supported
  • uniqueItems
    • rendering is not supported

integer (Number uses the same properties so if you need number, set your type explicitly)

online input limitation should be improved

  • exclusiveMaximum
  • exclusiveMinimum
  • maximum
  • minimum
  • multipleOf

object

  • additionalProperties
    • fixed rendering is not supported
  • dependencies
    • rendering is not supported
  • maxProperties
    • rendering is not supported
  • minProperties
    • rendering is not supported
  • patternProperties
    • fixed values can be only object types
    • done add buttons for remove existed patternProperties
    • fixed can not be mixed with properties
    • only regex .* in keys is supported
  • properties
  • required

string

online input limitation should be improved

  • maxLength
  • minLength
  • pattern