diff --git a/src/core/components/parameter-row.jsx b/src/core/components/parameter-row.jsx
index ed099951963..65f7da5afe3 100644
--- a/src/core/components/parameter-row.jsx
+++ b/src/core/components/parameter-row.jsx
@@ -3,7 +3,7 @@ import { Map, List, fromJS } from "immutable"
import PropTypes from "prop-types"
import ImPropTypes from "react-immutable-proptypes"
import win from "core/window"
-import { getExtensions, getCommonExtensions, numberToString, stringify, isEmptyValue, immutableToJS } from "core/utils"
+import { getExtensions, getCommonExtensions, numberToString, stringify, isEmptyValue } from "core/utils"
import getParameterSchema from "core/utils/get-parameter-schema.js"
export default class ParameterRow extends Component {
@@ -152,13 +152,13 @@ export default class ParameterRow extends Component {
//// Dispatch the initial value
- const type = fn.jsonSchema202012.foldType(immutableToJS(schema?.get("type")))
- const itemType = fn.jsonSchema202012.foldType(immutableToJS(schema?.getIn(["items", "type"])))
+ const schemaObjectType = fn.getSchemaObjectType(schema)
+ const schemaItemsType = fn.getSchemaObjectType(schema?.get("items"))
if(initialValue !== undefined) {
this.onChangeWrapper(initialValue)
} else if(
- type === "object"
+ schemaObjectType === "object"
&& generatedSampleValue
&& !paramWithMeta.get("examples")
) {
@@ -174,10 +174,10 @@ export default class ParameterRow extends Component {
stringify(generatedSampleValue)
)
)
- }
+ }
else if (
- type === "array"
- && itemType === "object"
+ schemaObjectType === "array"
+ && schemaItemsType === "object"
&& generatedSampleValue
&& !paramWithMeta.get("examples")
) {
@@ -251,17 +251,17 @@ export default class ParameterRow extends Component {
if (isOAS3) {
schema = this.composeJsonSchema(schema)
}
-
+
let format = schema ? schema.get("format") : null
let isFormData = inType === "formData"
let isFormDataSupported = "FormData" in win
let required = param.get("required")
- const typeLabel = fn.jsonSchema202012.getType(immutableToJS(schema))
- const type = fn.jsonSchema202012.foldType(immutableToJS(schema?.get("type")))
- const itemType = fn.jsonSchema202012.foldType(immutableToJS(schema?.getIn(["items", "type"])))
- const isObject = !bodyParam && type === "object"
- const isArrayOfObjects = !bodyParam && itemType === "object"
+ const schemaObjectType = fn.getSchemaObjectType(schema)
+ const schemaItemsType = fn.getSchemaObjectType(schema?.get("items"))
+ const schemaObjectTypeLabel = fn.getSchemaObjectTypeLabel(schema)
+ const isObject = !bodyParam && schemaObjectType === "object"
+ const isArrayOfObjects = !bodyParam && schemaItemsType === "object"
let value = paramWithMeta ? paramWithMeta.get("value") : ""
let commonExt = showCommonExtensions ? getCommonExtensions(schema) : null
@@ -322,7 +322,7 @@ export default class ParameterRow extends Component {
{ !required ? null : * }
- { typeLabel }
+ { schemaObjectTypeLabel }
{ format && (${format})}
@@ -371,7 +371,7 @@ export default class ParameterRow extends Component {
}
{ (isObject || isArrayOfObjects) ? (
-
- ) : jsonSchemaForm
+ ) : jsonSchemaForm
}
{
diff --git a/src/core/components/response.jsx b/src/core/components/response.jsx
index 6cf5d3d1d89..7efbc4925f6 100644
--- a/src/core/components/response.jsx
+++ b/src/core/components/response.jsx
@@ -6,7 +6,6 @@ import { fromJS, Seq, Iterable, List, Map } from "immutable"
import { getExtensions, fromJSOrdered, stringify } from "core/utils"
import { getKnownSyntaxHighlighterLanguage } from "core/utils/jsonParse"
-/* eslint-disable react/jsx-no-bind */
const getExampleComponent = ( sampleResponse, HighlightCode ) => {
if (sampleResponse == null) return null
@@ -140,8 +139,8 @@ export default class Response extends React.Component {
const targetExample = examplesForMediaType
.get(targetExamplesKey, Map({}))
const getMediaTypeExample = (targetExample) =>
- Map.isMap(targetExample)
- ? targetExample.get("value")
+ Map.isMap(targetExample)
+ ? targetExample.get("value")
: undefined
mediaTypeExample = getMediaTypeExample(targetExample)
if(mediaTypeExample === undefined) {
diff --git a/src/core/plugins/json-schema-5-samples/fn/index.js b/src/core/plugins/json-schema-5-samples/fn/index.js
index 3cf223342c8..95042a004ce 100644
--- a/src/core/plugins/json-schema-5-samples/fn/index.js
+++ b/src/core/plugins/json-schema-5-samples/fn/index.js
@@ -1,7 +1,7 @@
import XML from "xml"
import RandExp from "randexp"
import isEmpty from "lodash/isEmpty"
-import { objectify, isFunc, normalizeArray, deeplyStripKey } from "core/utils"
+import { deeplyStripKey, isFunc, normalizeArray, objectify, immutableToJS } from "core/utils"
import memoizeN from "core/utils/memoizeN"
const generateStringFromRegex = (pattern) => {
@@ -628,6 +628,7 @@ export const createXMLExample = (schema, config, o) => {
return XML(json, { declaration: true, indent: "\t" })
}
+
export const sampleFromSchema = (schema, config, o) =>
sampleFromSchemaGeneric(schema, config, o, false)
@@ -636,3 +637,5 @@ const resolver = (arg1, arg2, arg3) => [arg1, JSON.stringify(arg2), JSON.stringi
export const memoizedCreateXMLExample = memoizeN(createXMLExample, resolver)
export const memoizedSampleFromSchema = memoizeN(sampleFromSchema, resolver)
+
+export const getSchemaObjectType = (schema) => immutableToJS(schema)?.type ?? "string"
diff --git a/src/core/plugins/json-schema-5-samples/index.js b/src/core/plugins/json-schema-5-samples/index.js
index ca905c6484f..148afb4217e 100644
--- a/src/core/plugins/json-schema-5-samples/index.js
+++ b/src/core/plugins/json-schema-5-samples/index.js
@@ -9,6 +9,7 @@ import {
memoizedCreateXMLExample,
memoizedSampleFromSchema,
mergeJsonSchema,
+ getSchemaObjectType,
} from "./fn/index"
import makeGetJsonSampleSchema from "./fn/get-json-sample-schema"
import makeGetYamlSampleSchema from "./fn/get-yaml-sample-schema"
@@ -47,6 +48,7 @@ const JSONSchema5SamplesPlugin = ({ getSystem }) => {
getXmlSampleSchema,
getSampleSchema,
mergeJsonSchema,
+ getSchemaObjectType,
},
}
}
diff --git a/src/core/plugins/json-schema-5/components/json-schema-components.jsx b/src/core/plugins/json-schema-5/components/json-schema-components.jsx
index 6575a067dcd..9f1cf55163c 100644
--- a/src/core/plugins/json-schema-5/components/json-schema-components.jsx
+++ b/src/core/plugins/json-schema-5/components/json-schema-components.jsx
@@ -4,9 +4,7 @@ import { List, fromJS } from "immutable"
import cx from "classnames"
import ImPropTypes from "react-immutable-proptypes"
import DebounceInput from "react-debounce-input"
-import { stringify, isImmutable, immutableToJS } from "core/utils"
-
-/* eslint-disable react/jsx-no-bind */
+import { stringify, isImmutable } from "core/utils"
const noop = ()=> {}
const JsonSchemaPropShape = {
@@ -50,7 +48,7 @@ export class JsonSchemaForm extends Component {
let { schema, errors, value, onChange, getComponent, fn, disabled } = this.props
const format = schema && schema.get ? schema.get("format") : null
const type = schema && schema.get ? schema.get("type") : null
- const foldedType = fn.jsonSchema202012.foldType(immutableToJS(type))
+ const objectType = fn.getSchemaObjectType(schema)
const isFileUploadIntended = fn.isFileUploadIntended(schema)
let getComponentSilently = (name) => getComponent(name, false, { failSilently: true })
@@ -59,7 +57,7 @@ export class JsonSchemaForm extends Component {
getComponentSilently(`JsonSchema_${type}`) :
getComponent("JsonSchema_string")
- if (!isFileUploadIntended && List.isList(type) && (foldedType === "array" || foldedType === "object")) {
+ if (!isFileUploadIntended && List.isList(type) && (objectType === "array" || objectType === "object")) {
Comp = getComponent("JsonSchema_object")
}
@@ -192,23 +190,23 @@ export class JsonSchema_array extends PureComponent {
.map(e => e.error)
const value = this.state.value // expect Im List
const shouldRenderValue =
- value && value.count && value.count() > 0 ? true : false
+ !!(value && value.count && value.count() > 0)
const schemaItemsEnum = schema.getIn(["items", "enum"])
- const schemaItemsType = schema.getIn(["items", "type"])
- const foldedSchemaItemsType = fn.jsonSchema202012.foldType(immutableToJS(schemaItemsType))
- const schemaItemsTypeLabel = fn.jsonSchema202012.getType(immutableToJS(schema.get("items")))
+ const schemaItems = schema.get("items")
+ const schemaItemsType = fn.getSchemaObjectType(schemaItems)
+ const schemaItemsTypeLabel = fn.getSchemaObjectTypeLabel(schemaItems)
const schemaItemsFormat = schema.getIn(["items", "format"])
const schemaItemsSchema = schema.get("items")
let ArrayItemsComponent
let isArrayItemText = false
- let isArrayItemFile = (schemaItemsType === "file" || (schemaItemsType === "string" && schemaItemsFormat === "binary")) ? true : false
+ let isArrayItemFile = (schemaItemsType === "file" || (schemaItemsType === "string" && schemaItemsFormat === "binary"))
if (schemaItemsType && schemaItemsFormat) {
ArrayItemsComponent = getComponent(`JsonSchema_${schemaItemsType}_${schemaItemsFormat}`)
} else if (schemaItemsType === "boolean" || schemaItemsType === "array" || schemaItemsType === "object") {
ArrayItemsComponent = getComponent(`JsonSchema_${schemaItemsType}`)
}
- if (List.isList(schemaItemsType) && (foldedSchemaItemsType === "array" || foldedSchemaItemsType === "object")) {
+ if (List.isList(schemaItems?.get("type")) && (schemaItemsType === "array" || schemaItemsType === "object")) {
ArrayItemsComponent = getComponent(`JsonSchema_object`)
}
diff --git a/src/core/plugins/json-schema-5/fn.js b/src/core/plugins/json-schema-5/fn.js
index c4844b4bcba..19e61bfac65 100644
--- a/src/core/plugins/json-schema-5/fn.js
+++ b/src/core/plugins/json-schema-5/fn.js
@@ -3,6 +3,7 @@
*/
import { Map } from "immutable"
import isPlainObject from "lodash/isPlainObject"
+import { immutableToJS } from "core/utils"
export const hasSchemaType = (schema, type) => {
const isSchemaImmutable = Map.isMap(schema)
@@ -17,3 +18,34 @@ export const hasSchemaType = (schema, type) => {
type === schemaType || (Array.isArray(type) && type.includes(schemaType))
)
}
+
+const getType = (schema, processedSchemas = new WeakSet()) => {
+ if (schema == null) {
+ return "any"
+ }
+
+ if (processedSchemas.has(schema)) {
+ return "any" // detect a cycle
+ }
+
+ processedSchemas.add(schema)
+
+ const { type, items } = schema
+
+ const getArrayType = () => {
+ if (items) {
+ const itemsType = getType(items, processedSchemas)
+ return `array<${itemsType}>`
+ } else {
+ return "array
"
+ }
+ }
+
+ if (Object.hasOwn(schema, "items")) {
+ return getArrayType()
+ }
+ return type
+}
+
+export const getSchemaObjectTypeLabel = (schema) =>
+ getType(immutableToJS(schema))
diff --git a/src/core/plugins/json-schema-5/index.js b/src/core/plugins/json-schema-5/index.js
index f3e394a1699..3e1f887767e 100644
--- a/src/core/plugins/json-schema-5/index.js
+++ b/src/core/plugins/json-schema-5/index.js
@@ -14,7 +14,7 @@ import Schemes from "./components/schemes"
import SchemesContainer from "./containers/schemes"
import * as JSONSchemaComponents from "./components/json-schema-components"
import { ModelExtensions } from "./components/model-extensions"
-import { hasSchemaType } from "./fn"
+import { getSchemaObjectTypeLabel, hasSchemaType } from "./fn"
const JSONSchema5Plugin = () => ({
components: {
@@ -34,6 +34,7 @@ const JSONSchema5Plugin = () => ({
},
fn: {
hasSchemaType,
+ getSchemaObjectTypeLabel,
},
})
diff --git a/src/core/plugins/oas3/components/request-body.jsx b/src/core/plugins/oas3/components/request-body.jsx
index d7065ee04d0..b85f597d1ef 100644
--- a/src/core/plugins/oas3/components/request-body.jsx
+++ b/src/core/plugins/oas3/components/request-body.jsx
@@ -2,11 +2,9 @@ import React from "react"
import PropTypes from "prop-types"
import ImPropTypes from "react-immutable-proptypes"
import { Map, OrderedMap, List, fromJS } from "immutable"
-import { getCommonExtensions, stringify, isEmptyValue, immutableToJS } from "core/utils"
+import { getCommonExtensions, stringify, isEmptyValue } from "core/utils"
import { getKnownSyntaxHighlighterLanguage } from "core/utils/jsonParse"
-/* eslint-disable react/jsx-no-bind */
-
export const getDefaultRequestBodyValue = (requestBody, mediaType, activeExamplesKey, fn) => {
const mediaTypeValue = requestBody.getIn(["content", mediaType]) ?? OrderedMap()
const schema = mediaTypeValue.get("schema", OrderedMap()).toJS()
@@ -160,9 +158,9 @@ const RequestBody = ({
let commonExt = showCommonExtensions ? getCommonExtensions(schema) : null
const required = schemaForMediaType.get("required", List()).includes(key)
- const typeLabel = fn.jsonSchema202012.getType(immutableToJS(schema))
- const type = fn.jsonSchema202012.foldType(immutableToJS(schema?.get("type")))
- const itemType = fn.jsonSchema202012.foldType(immutableToJS(schema?.getIn(["items", "type"])))
+ const objectType = fn.getSchemaObjectType(schema)
+ const objectTypeLabel = fn.getSchemaObjectTypeLabel(schema)
+ const schemaItemsType = fn.getSchemaObjectType(schema?.get("items"))
const format = schema.get("format")
const description = schema.get("description")
const currentValue = requestBodyValue.getIn([key, "value"])
@@ -181,11 +179,11 @@ const RequestBody = ({
initialValue = "0"
}
- if (typeof initialValue !== "string" && type === "object") {
+ if (typeof initialValue !== "string" && objectType === "object") {
initialValue = stringify(initialValue)
}
- if (typeof initialValue === "string" && type === "array") {
+ if (typeof initialValue === "string" && objectType === "array") {
initialValue = JSON.parse(initialValue)
}
@@ -212,7 +210,7 @@ const RequestBody = ({
{ !required ? null : * }
- { typeLabel }
+ { objectTypeLabel }
{ format &&
(${format})}
{!showCommonExtensions || !commonExt.size ? null : commonExt.entrySeq().map(([key, v]) =>
)}
@@ -223,7 +221,7 @@ const RequestBody = ({
{isExecute ?
- {(type === "object" || itemType === "object") ? (
+ {(objectType === "object" || schemaItemsType === "object") ? (
+ fn.jsonSchema202012.getType(immutableToJS(schema)),
+ getSchemaObjectType: (schema) =>
+ fn.jsonSchema202012.foldType(immutableToJS(schema)?.type),
},
getSystem()
)
diff --git a/test/unit/bugs/4557-default-parameter-values.jsx b/test/unit/bugs/4557-default-parameter-values.jsx
index e5110905e3b..0365ce7d8c9 100644
--- a/test/unit/bugs/4557-default-parameter-values.jsx
+++ b/test/unit/bugs/4557-default-parameter-values.jsx
@@ -6,20 +6,17 @@ import { List, fromJS } from "immutable"
import { render } from "enzyme"
import ParameterRow from "core/components/parameter-row"
+import { getSchemaObjectTypeLabel } from "core/plugins/json-schema-5/fn"
import {
memoizedSampleFromSchema,
memoizedCreateXMLExample,
mergeJsonSchema,
+ getSchemaObjectType,
} from "core/plugins/json-schema-5-samples/fn/index"
import makeGetSampleSchema from "core/plugins/json-schema-5-samples/fn/get-sample-schema"
import makeGetJsonSampleSchema from "core/plugins/json-schema-5-samples/fn/get-json-sample-schema"
import makeGetYamlSampleSchema from "core/plugins/json-schema-5-samples/fn/get-yaml-sample-schema"
import makeGetXmlSampleSchema from "core/plugins/json-schema-5-samples/fn/get-xml-sample-schema"
-import { foldType } from "core/plugins/json-schema-2020-12-samples/fn/index"
-import {
- makeGetType,
- isBooleanJSONSchema,
-} from "core/plugins/json-schema-2020-12/fn.js"
describe("bug #4557: default parameter values", function () {
it("should apply a Swagger 2.0 default value", function () {
@@ -48,14 +45,12 @@ describe("bug #4557: default parameter values", function () {
fn: {
memoizedSampleFromSchema,
memoizedCreateXMLExample,
+ getSchemaObjectTypeLabel,
+ getSchemaObjectType,
getJsonSampleSchema: makeGetJsonSampleSchema(getSystem),
getYamlSampleSchema: makeGetYamlSampleSchema(getSystem),
getXmlSampleSchema: makeGetXmlSampleSchema(getSystem),
getSampleSchema: makeGetSampleSchema(getSystem),
- jsonSchema202012: {
- foldType,
- getType: makeGetType(() => ({ isBooleanJSONSchema })),
- },
},
})
const props = {
@@ -109,15 +104,13 @@ describe("bug #4557: default parameter values", function () {
fn: {
memoizedSampleFromSchema,
memoizedCreateXMLExample,
+ getSchemaObjectTypeLabel,
+ getSchemaObjectType,
getJsonSampleSchema: makeGetJsonSampleSchema(getSystem),
getYamlSampleSchema: makeGetYamlSampleSchema(getSystem),
getXmlSampleSchema: makeGetXmlSampleSchema(getSystem),
getSampleSchema: makeGetSampleSchema(getSystem),
mergeJsonSchema,
- jsonSchema202012: {
- foldType,
- getType: makeGetType(() => ({ isBooleanJSONSchema })),
- },
},
})
const props = {
diff --git a/test/unit/components/parameter-row.jsx b/test/unit/components/parameter-row.jsx
index 9a5f380b7df..862a055c4de 100644
--- a/test/unit/components/parameter-row.jsx
+++ b/test/unit/components/parameter-row.jsx
@@ -6,20 +6,17 @@ import { List, fromJS } from "immutable"
import { render } from "enzyme"
import ParameterRow from "core/components/parameter-row"
+import { getSchemaObjectTypeLabel } from "core/plugins/json-schema-5/fn"
import {
memoizedSampleFromSchema,
memoizedCreateXMLExample,
mergeJsonSchema,
+ getSchemaObjectType,
} from "core/plugins/json-schema-5-samples/fn/index"
import makeGetSampleSchema from "core/plugins/json-schema-5-samples/fn/get-sample-schema"
import makeGetJsonSampleSchema from "core/plugins/json-schema-5-samples/fn/get-json-sample-schema"
import makeGetYamlSampleSchema from "core/plugins/json-schema-5-samples/fn/get-yaml-sample-schema"
import makeGetXmlSampleSchema from "core/plugins/json-schema-5-samples/fn/get-xml-sample-schema"
-import { foldType } from "core/plugins/json-schema-2020-12-samples/fn/index"
-import {
- makeGetType,
- isBooleanJSONSchema,
-} from "core/plugins/json-schema-2020-12/fn.js"
describe("", () => {
const createProps = ({ param, isOAS3 }) => {
@@ -33,15 +30,13 @@ describe("", () => {
fn: {
memoizedSampleFromSchema,
memoizedCreateXMLExample,
+ getSchemaObjectTypeLabel,
+ getSchemaObjectType,
getJsonSampleSchema: makeGetJsonSampleSchema(getSystem),
getYamlSampleSchema: makeGetYamlSampleSchema(getSystem),
getXmlSampleSchema: makeGetXmlSampleSchema(getSystem),
getSampleSchema: makeGetSampleSchema(getSystem),
mergeJsonSchema,
- jsonSchema202012: {
- foldType,
- getType: makeGetType(() => ({ isBooleanJSONSchema })),
- },
},
oas3Selectors: { activeExamplesMember: () => {} },
getConfigs: () => ({}),
@@ -178,14 +173,12 @@ describe("bug #5573: zero default and example values", function () {
fn: {
memoizedSampleFromSchema,
memoizedCreateXMLExample,
+ getSchemaObjectTypeLabel,
+ getSchemaObjectType,
getJsonSampleSchema: makeGetJsonSampleSchema(getSystem),
getYamlSampleSchema: makeGetYamlSampleSchema(getSystem),
getXmlSampleSchema: makeGetXmlSampleSchema(getSystem),
getSampleSchema: makeGetSampleSchema(getSystem),
- jsonSchema202012: {
- foldType,
- getType: makeGetType(() => ({ isBooleanJSONSchema })),
- },
},
getConfigs: () => {
return {}
@@ -234,14 +227,12 @@ describe("bug #5573: zero default and example values", function () {
fn: {
memoizedSampleFromSchema,
memoizedCreateXMLExample,
+ getSchemaObjectTypeLabel,
+ getSchemaObjectType,
getJsonSampleSchema: makeGetJsonSampleSchema(getSystem),
getYamlSampleSchema: makeGetYamlSampleSchema(getSystem),
getXmlSampleSchema: makeGetXmlSampleSchema(getSystem),
getSampleSchema: makeGetSampleSchema(getSystem),
- jsonSchema202012: {
- foldType,
- getType: makeGetType(() => ({ isBooleanJSONSchema })),
- },
},
})
const props = {
@@ -291,15 +282,13 @@ describe("bug #5573: zero default and example values", function () {
fn: {
memoizedSampleFromSchema,
memoizedCreateXMLExample,
+ getSchemaObjectTypeLabel,
+ getSchemaObjectType,
getJsonSampleSchema: makeGetJsonSampleSchema(getSystem),
getYamlSampleSchema: makeGetYamlSampleSchema(getSystem),
getXmlSampleSchema: makeGetXmlSampleSchema(getSystem),
getSampleSchema: makeGetSampleSchema(getSystem),
mergeJsonSchema,
- jsonSchema202012: {
- foldType,
- getType: makeGetType(() => ({ isBooleanJSONSchema })),
- },
},
})
const props = {
@@ -349,15 +338,13 @@ describe("bug #5573: zero default and example values", function () {
fn: {
memoizedSampleFromSchema,
memoizedCreateXMLExample,
+ getSchemaObjectTypeLabel,
+ getSchemaObjectType,
getJsonSampleSchema: makeGetJsonSampleSchema(getSystem),
getYamlSampleSchema: makeGetYamlSampleSchema(getSystem),
getXmlSampleSchema: makeGetXmlSampleSchema(getSystem),
getSampleSchema: makeGetSampleSchema(getSystem),
mergeJsonSchema,
- jsonSchema202012: {
- foldType,
- getType: makeGetType(() => ({ isBooleanJSONSchema })),
- },
},
})
const props = {
diff --git a/test/unit/core/plugins/json-schema-5/components/json-schema-form.jsx b/test/unit/core/plugins/json-schema-5/components/json-schema-form.jsx
index 4600beb0784..5d54ebb5d5e 100644
--- a/test/unit/core/plugins/json-schema-5/components/json-schema-form.jsx
+++ b/test/unit/core/plugins/json-schema-5/components/json-schema-form.jsx
@@ -2,8 +2,8 @@ import React from "react"
import Immutable, { List } from "immutable"
import { Select, Input, TextArea } from "core/components/layout-utils"
import { mount, render } from "enzyme"
+import { getSchemaObjectType } from "core/plugins/json-schema-5-samples/fn/index"
import * as JsonSchemaComponents from "core/plugins/json-schema-5/components/json-schema-components"
-import { foldType } from "core/plugins/json-schema-2020-12-samples/fn/index"
import { makeIsFileUploadIntended } from "core/plugins/oas3/fn"
const components = {...JsonSchemaComponents, Select, Input, TextArea}
@@ -34,9 +34,7 @@ describe("", function(){
onChange: () => {},
keyName: "",
fn: {
- jsonSchema202012: {
- foldType,
- },
+ getSchemaObjectType,
isFileUploadIntended: makeIsFileUploadIntended(getSystemStub)
},
schema: Immutable.fromJS({
@@ -62,9 +60,7 @@ describe("", function(){
onChange: () => {},
keyName: "",
fn: {
- jsonSchema202012: {
- foldType,
- },
+ getSchemaObjectType,
isFileUploadIntended: makeIsFileUploadIntended(getSystemStub)
},
schema: Immutable.fromJS({
@@ -88,9 +84,7 @@ describe("", function(){
onChange: () => {},
keyName: "",
fn: {
- jsonSchema202012: {
- foldType,
- },
+ getSchemaObjectType,
isFileUploadIntended: makeIsFileUploadIntended(getSystemStub)
},
required: true,
@@ -117,9 +111,7 @@ describe("", function(){
onChange: () => {},
keyName: "",
fn: {
- jsonSchema202012: {
- foldType,
- },
+ getSchemaObjectType,
isFileUploadIntended: makeIsFileUploadIntended(getSystemStub)
},
schema: Immutable.fromJS({
@@ -145,9 +137,7 @@ describe("", function(){
onChange: () => {},
keyName: "",
fn: {
- jsonSchema202012: {
- foldType,
- },
+ getSchemaObjectType,
isFileUploadIntended: makeIsFileUploadIntended(getSystemStub)
},
schema: Immutable.fromJS({
@@ -173,9 +163,7 @@ describe("", function(){
onChange: () => {},
keyName: "",
fn: {
- jsonSchema202012: {
- foldType,
- },
+ getSchemaObjectType,
isFileUploadIntended: makeIsFileUploadIntended(getSystemStub)
},
schema: Immutable.fromJS({
@@ -202,9 +190,7 @@ describe("", function(){
onChange: () => {},
keyName: "",
fn: {
- jsonSchema202012: {
- foldType,
- },
+ getSchemaObjectType,
isFileUploadIntended: makeIsFileUploadIntended(getSystemStub)
},
required: true,
@@ -234,9 +220,7 @@ describe("", function(){
},
keyName: "",
fn: {
- jsonSchema202012: {
- foldType,
- },
+ getSchemaObjectType,
isFileUploadIntended: makeIsFileUploadIntended(getSystemStub)
},
errors: List(),
@@ -268,9 +252,7 @@ describe("", function(){
onChange: () => {},
keyName: "",
fn: {
- jsonSchema202012: {
- foldType,
- },
+ getSchemaObjectType,
isFileUploadIntended: makeIsFileUploadIntended(getSystemStub)
},
schema: Immutable.fromJS({
@@ -295,9 +277,7 @@ describe("", function(){
onChange: () => {},
keyName: "",
fn: {
- jsonSchema202012: {
- foldType,
- },
+ getSchemaObjectType,
isFileUploadIntended: makeIsFileUploadIntended(getSystemStub)
},
schema: Immutable.fromJS({
|