File tree Expand file tree Collapse file tree 4 files changed +23
-5
lines changed
springdoc-openapi-common/src/main/java/org/springdoc/core
springdoc-openapi-security
springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app72 Expand file tree Collapse file tree 4 files changed +23
-5
lines changed Original file line number Diff line number Diff line change 23
23
import org .springframework .web .bind .annotation .ResponseStatus ;
24
24
import org .springframework .web .method .HandlerMethod ;
25
25
26
- import java .lang .reflect .Method ;
27
- import java .lang .reflect .ParameterizedType ;
28
- import java .lang .reflect .Type ;
26
+ import java .lang .reflect .*;
29
27
import java .util .*;
30
28
import java .util .stream .Collectors ;
31
29
import java .util .stream .Stream ;
@@ -344,4 +342,15 @@ private boolean isVoid(Type returnType) {
344
342
return Void .TYPE .equals (returnType ) || (returnType instanceof ParameterizedType
345
343
&& Void .class .equals (((ParameterizedType ) returnType ).getActualTypeArguments ()[0 ]));
346
344
}
345
+
346
+ interface ReturnTypeParser {
347
+ Type getReturnType (Method method );
348
+ }
349
+
350
+ public static class GenericReturnTypeParser implements ReturnTypeParser {
351
+ @ Override
352
+ public Type getReturnType (Method method ) {
353
+ return method .getGenericReturnType ();
354
+ }
355
+ }
347
356
}
Original file line number Diff line number Diff line change 3
3
import java .lang .reflect .Method ;
4
4
import java .lang .reflect .Type ;
5
5
6
- interface ReturnTypeParser {
6
+ public interface ReturnTypeParser {
7
7
default Type getReturnType (Method method ) {
8
8
return method .getGenericReturnType ();
9
9
}
Original file line number Diff line number Diff line change 9
9
10
10
<artifactId >springdoc-openapi-security</artifactId >
11
11
12
+ <properties >
13
+ <jaxb-impl .version>2.1</jaxb-impl .version>
14
+ </properties >
15
+
12
16
<dependencies >
13
17
<!-- springdoc-common -->
14
18
<dependency >
41
45
<artifactId >hibernate-validator</artifactId >
42
46
<scope >test</scope >
43
47
</dependency >
48
+ <dependency >
49
+ <groupId >javax.xml</groupId >
50
+ <artifactId >jaxb-impl</artifactId >
51
+ <version >${jaxb-impl.version} </version >
52
+ <scope >test</scope >
53
+ </dependency >
44
54
</dependencies >
45
55
46
56
</project >
Original file line number Diff line number Diff line change 1
1
package test .org .springdoc .api .app72 ;
2
2
3
3
import org .junit .Test ;
4
- import org .springframework .boot .SpringBootConfiguration ;
5
4
import org .springframework .boot .autoconfigure .EnableAutoConfiguration ;
6
5
import org .springframework .boot .test .context .runner .WebApplicationContextRunner ;
7
6
You can’t perform that action at this time.
0 commit comments