@@ -2661,7 +2661,7 @@ public CodegenOperation fromOperation(String path,
2661
2661
if (requestBody != null ) {
2662
2662
if (getContentType (requestBody ) != null &&
2663
2663
(getContentType (requestBody ).toLowerCase (Locale .ROOT ).startsWith ("application/x-www-form-urlencoded" ) ||
2664
- getContentType (requestBody ).toLowerCase (Locale .ROOT ).startsWith ("multipart/form-data " ))) {
2664
+ getContentType (requestBody ).toLowerCase (Locale .ROOT ).startsWith ("multipart" ))) {
2665
2665
// process form parameters
2666
2666
formParams = fromRequestBodyToFormParameters (requestBody , imports );
2667
2667
for (CodegenParameter cp : formParams ) {
@@ -4464,7 +4464,7 @@ public boolean hasFormParameter(OpenAPI openAPI, Operation operation) {
4464
4464
for (String consume : consumesInfo ) {
4465
4465
if (consume != null &&
4466
4466
consume .toLowerCase (Locale .ROOT ).startsWith ("application/x-www-form-urlencoded" ) ||
4467
- consume .toLowerCase (Locale .ROOT ).startsWith ("multipart/form-data " )) {
4467
+ consume .toLowerCase (Locale .ROOT ).startsWith ("multipart" )) {
4468
4468
return true ;
4469
4469
}
4470
4470
}
@@ -4907,7 +4907,7 @@ public CodegenParameter fromRequestBody(RequestBody body, Set<String> imports, S
4907
4907
LOGGER .warn ("The following schema has undefined (null) baseType. " +
4908
4908
"It could be due to form parameter defined in OpenAPI v2 spec with incorrect consumes. " +
4909
4909
"A correct 'consumes' for form parameters should be " +
4910
- "'application/x-www-form-urlencoded' or 'multipart/form-data '" );
4910
+ "'application/x-www-form-urlencoded' or 'multipart/? '" );
4911
4911
LOGGER .warn ("schema: " + schema );
4912
4912
LOGGER .warn ("codegenModel is null. Default to UNKNOWN_BASE_TYPE" );
4913
4913
codegenModelName = "UNKNOWN_BASE_TYPE" ;
0 commit comments