@@ -714,13 +714,13 @@ public void testMultipartBoot() throws IOException {
714
714
715
715
// Check that the delegate handles the array
716
716
JavaFileAssert .assertThat (files .get ("MultipartArrayApiDelegate.java" ))
717
- .assertMethod ("multipartArray" , "List<MultipartFile >" )
718
- .hasParameter ("files" ).withType ("List<MultipartFile >" );
717
+ .assertMethod ("multipartArray" , "List<org.springframework.core.io.Resource >" )
718
+ .hasParameter ("files" ).withType ("List<org.springframework.core.io.Resource >" );
719
719
720
720
// Check that the api handles the array
721
721
JavaFileAssert .assertThat (files .get ("MultipartArrayApi.java" ))
722
- .assertMethod ("multipartArray" , "List<MultipartFile >" )
723
- .hasParameter ("files" ).withType ("List<MultipartFile >" )
722
+ .assertMethod ("multipartArray" , "List<org.springframework.core.io.Resource >" )
723
+ .hasParameter ("files" ).withType ("List<org.springframework.core.io.Resource >" )
724
724
.assertParameterAnnotations ()
725
725
.containsWithNameAndAttributes ("ApiParam" , ImmutableMap .of ("value" , "\" Many files\" " ))
726
726
.containsWithNameAndAttributes ("RequestPart" , ImmutableMap .of ("value" , "\" files\" " , "required" , "false" ));
@@ -734,22 +734,22 @@ public void testMultipartBoot() throws IOException {
734
734
735
735
// Check that the api handles the single file
736
736
JavaFileAssert .assertThat (files .get ("MultipartSingleApi.java" ))
737
- .assertMethod ("multipartSingle" , "MultipartFile " )
738
- .hasParameter ("file" ).withType ("MultipartFile " )
737
+ .assertMethod ("multipartSingle" , "org.springframework.core.io.Resource " )
738
+ .hasParameter ("file" ).withType ("org.springframework.core.io.Resource " )
739
739
.assertParameterAnnotations ()
740
740
.containsWithNameAndAttributes ("ApiParam" , ImmutableMap .of ("value" , "\" One file\" " ))
741
741
.containsWithNameAndAttributes ("RequestPart" , ImmutableMap .of ("value" , "\" file\" " , "required" , "false" ));
742
742
743
743
// Check that api validates mixed multipart request
744
744
JavaFileAssert .assertThat (files .get ("MultipartMixedApi.java" ))
745
- .assertMethod ("multipartMixed" , "MultipartMixedStatus" , "MultipartFile " , "MultipartMixedRequestMarker" , "List<MultipartMixedStatus>" )
745
+ .assertMethod ("multipartMixed" , "MultipartMixedStatus" , "org.springframework.core.io.Resource " , "MultipartMixedRequestMarker" , "List<MultipartMixedStatus>" )
746
746
.hasParameter ("status" ).withType ("MultipartMixedStatus" )
747
747
.assertParameterAnnotations ()
748
748
.containsWithName ("Valid" )
749
749
.containsWithNameAndAttributes ("ApiParam" , ImmutableMap .of ("value" , "\" \" " ))
750
750
.containsWithNameAndAttributes ("RequestParam" , ImmutableMap .of ("value" , "\" status\" " , "required" , "true" ))
751
751
.toParameter ().toMethod ()
752
- .hasParameter ("file" ).withType ("MultipartFile " )
752
+ .hasParameter ("file" ).withType ("org.springframework.core.io.Resource " )
753
753
.assertParameterAnnotations ()
754
754
.containsWithNameAndAttributes ("RequestPart" , ImmutableMap .of ("value" , "\" file\" " , "required" , "true" ))
755
755
.toParameter ().toMethod ()
@@ -1488,8 +1488,8 @@ public void shouldEscapeReservedKeyWordsForRequestParameters_7506_Regression() t
1488
1488
final Map <String , File > files = generateFiles (codegen , "src/test/resources/3_0/issue7506.yaml" );
1489
1489
1490
1490
final File multipartArrayApiDelegate = files .get ("ExampleApi.java" );
1491
- assertFileContains (multipartArrayApiDelegate .toPath (), "@RequestPart(value = \" super\" , required = false) MultipartFile _super" );
1492
- assertFileContains (multipartArrayApiDelegate .toPath (), "@RequestPart(value = \" package\" , required = false) MultipartFile _package" );
1491
+ assertFileContains (multipartArrayApiDelegate .toPath (), "@RequestPart(value = \" super\" , required = false) org.springframework.core.io.Resource _super" );
1492
+ assertFileContains (multipartArrayApiDelegate .toPath (), "@RequestPart(value = \" package\" , required = false) org.springframework.core.io.Resource _package" );
1493
1493
}
1494
1494
1495
1495
@ Test
0 commit comments