File tree Expand file tree Collapse file tree 3 files changed +22
-1
lines changed Expand file tree Collapse file tree 3 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ export default class Response extends React.Component {
109109
110110 // Goal: find a schema value for `schema`
111111 if ( isOAS3 ) {
112- const oas3SchemaForContentType = activeMediaType . get ( "schema" , Map ( { } ) )
112+ const oas3SchemaForContentType = activeMediaType . get ( "schema" )
113113
114114 schema = oas3SchemaForContentType ? inferSchema ( oas3SchemaForContentType . toJS ( ) ) : null
115115 specPathWithPossibleSchema = oas3SchemaForContentType ? List ( [ "content" , this . state . responseContentType , "schema" ] ) : specPath
Original file line number Diff line number Diff line change 1+ openapi : 3.0.2
2+ info :
3+ title : Response without a schema
4+ version : 1.0.0
5+ paths :
6+ /foo :
7+ get :
8+ responses :
9+ ' 200 ' :
10+ description : OK
Original file line number Diff line number Diff line change 1+ // http://github.com/swagger-api/swagger-ui/issues/5453
2+
3+ describe ( "#5453: Responses w/o `content` should not render ModelExample" , ( ) => {
4+ it ( "should not render a ModelExample section" , ( ) => {
5+ cy . visit ( "/?url=/documents/bugs/5453.yaml" )
6+ . get ( "#operations-default-get_foo" )
7+ . click ( )
8+ . get ( ".responses-inner" )
9+ . should ( "not.have.descendants" , ".model-example" )
10+ } )
11+ } )
You can’t perform that action at this time.
0 commit comments