ft: JsonSchema components are now ImmutableJS compliant (#5952)

bug: JsonSchema components should validate schema properties exists
  - schema
  - type
  - format
  - enum
bug: fix a debounce error in JsonSchema_string if value is null
ft: new simplified JsonSchemaArrayItemText component
test: use immutableJS for `json-schema-form` test
test: add dev scripts to run `cypress open`
test: new cypress `schema-form` tests
This commit is contained in:
Tim Lai
2020-05-06 13:57:58 -07:00
committed by GitHub
parent b38203e21a
commit 5eb23cdd48
9 changed files with 1508 additions and 113 deletions

View File

@@ -9,10 +9,11 @@ export default OAS3ComponentWrapFactory(({ Ori, ...props }) => {
onChange
} = props
const { type, format } = schema
const format = schema && schema.get ? schema.get("format") : null
const type = schema && schema.get ? schema.get("type") : null
const Input = getComponent("Input")
if(type === "string" && (format === "binary" || format === "base64")) {
if(type && type === "string" && (format && (format === "binary" || format === "base64"))) {
return <Input type="file"
className={ errors.length ? "invalid" : ""}
title={ errors.length ? errors : ""}

View File

@@ -100,7 +100,6 @@ const wrapRender = (component) => {
return target
}
export const getComponent = (getSystem, getStore, getComponents, componentName, container, config = {}) => {
if(typeof componentName !== "string")