File tree Expand file tree Collapse file tree 4 files changed +27
-4
lines changed Expand file tree Collapse file tree 4 files changed +27
-4
lines changed Original file line number Diff line number Diff line change @@ -29,12 +29,12 @@ const RequestBody = ({
2929
3030 const mediaTypeValue = requestBodyContent . get ( contentType )
3131
32- const isObjectContent = mediaTypeValue . getIn ( [ "schema" , "type" ] ) === "object"
33-
3432 if ( ! mediaTypeValue ) {
3533 return null
3634 }
3735
36+ const isObjectContent = mediaTypeValue . getIn ( [ "schema" , "type" ] ) === "object"
37+
3838 if (
3939 contentType === "application/octet-stream"
4040 || contentType . indexOf ( "image/" ) === 0
Original file line number Diff line number Diff line change 11import React , { Component } from "react"
22import PropTypes from "prop-types"
3- import Im , { Map } from "immutable"
3+ import Im , { Map , List } from "immutable"
44import ImPropTypes from "react-immutable-proptypes"
55import { OAS3ComponentWrapFactory } from "../helpers"
66
@@ -177,7 +177,7 @@ class Parameters extends Component {
177177 < label >
178178 < ContentType
179179 value = { oas3Selectors . requestContentType ( ...pathMethod ) }
180- contentTypes = { requestBody . get ( "content" ) . keySeq ( ) }
180+ contentTypes = { requestBody . get ( "content" , List ( ) ) . keySeq ( ) }
181181 onChange = { ( value ) => {
182182 oas3Actions . setRequestContentType ( { value, pathMethod } )
183183 } }
Original file line number Diff line number Diff line change 1+ openapi : " 3.0.0"
2+
3+ paths :
4+ /some/route :
5+ post :
6+ description : This should be visible
7+ tags :
8+ - Some
9+ requestBody : {}
10+ responses :
11+ ' 200 ' :
12+ description : Description
Original file line number Diff line number Diff line change 1+ import repeat from "lodash/repeat"
2+
3+ describe ( "#4838: empty request bodies result in endless loading" , ( ) => {
4+ it ( "should render model content changes correctly" , ( ) => {
5+ cy
6+ . visit ( "/?url=/documents/bugs/4838.yaml" )
7+ . get ( "#operations-Some-post_some_route" )
8+ . click ( )
9+ . contains ( "This should be visible" )
10+ } )
11+ } )
You can’t perform that action at this time.
0 commit comments