diff --git a/src/core/plugins/oas3/components/request-body.jsx b/src/core/plugins/oas3/components/request-body.jsx index fb0baab2..27b7bd5b 100644 --- a/src/core/plugins/oas3/components/request-body.jsx +++ b/src/core/plugins/oas3/components/request-body.jsx @@ -1,8 +1,7 @@ import React from "react" import PropTypes from "prop-types" import ImPropTypes from "react-immutable-proptypes" -import { getSampleSchema } from "core/utils" -import { Map, OrderedMap } from "immutable" +import { Map, OrderedMap, List } from "immutable" const RequestBody = ({ requestBody, @@ -59,8 +58,8 @@ const RequestBody = ({ || contentType.indexOf("multipart/") === 0)) { const JsonSchemaForm = getComponent("JsonSchemaForm") - const HighlightCode = getComponent("highlightCode") - const bodyProperties = requestBody.getIn(["content", contentType, "schema", "properties"], OrderedMap()) + const schemaForContentType = requestBody.getIn(["content", contentType, "schema"], OrderedMap()) + const bodyProperties = schemaForContentType.getIn([ "properties"], OrderedMap()) requestBodyValue = Map.isMap(requestBodyValue) ? requestBodyValue : OrderedMap() return