File tree 1 file changed +3
-1
lines changed
src/core/plugins/oas3/components
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -107,12 +107,14 @@ const RequestBody = ({
107
107
}
108
108
109
109
const isObjectContent = mediaTypeValue . getIn ( [ "schema" , "type" ] ) === "object"
110
+ const isBinaryFormat = mediaTypeValue . getIn ( [ "schema" , "format" ] ) === "binary"
110
111
111
112
if (
112
113
contentType === "application/octet-stream"
113
114
|| contentType . indexOf ( "image/" ) === 0
114
115
|| contentType . indexOf ( "audio/" ) === 0
115
116
|| contentType . indexOf ( "video/" ) === 0
117
+ || isBinaryFormat
116
118
) {
117
119
const Input = getComponent ( "Input" )
118
120
@@ -163,7 +165,7 @@ const RequestBody = ({
163
165
|| prop . hasIn ( [ "items" , "default" ] )
164
166
const useInitialValFromEnum = prop . has ( "enum" ) && ( prop . get ( "enum" ) . size === 1 || required )
165
167
const useInitialValue = useInitialValFromSchemaSamples || useInitialValFromEnum
166
-
168
+
167
169
let initialValue = ""
168
170
if ( type === "array" && ! useInitialValue ) {
169
171
initialValue = [ ]
You can’t perform that action at this time.
0 commit comments