Skip to content

Commit f383457

Browse files
dpegerfrantuma
authored andcommitted
#4103 Support for Jackson reference types
In addition to the hard coded `Optional` reference types the type information from jackson is used to unwrap additional reference types (e.g. `AtomicReference`)
1 parent aa1aed7 commit f383457

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/swagger-core/src/main/java/io/swagger/v3/core/util/ReferenceTypeUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ public abstract class ReferenceTypeUtils {
1313

1414
public static boolean _isReferenceType(JavaType jtype) {
1515

16-
return Arrays.asList("com.google.common.base.Optional", "java.util.Optional", "java.util.concurrent.atomic.AtomicReference")
17-
.contains(jtype.getRawClass().getCanonicalName());
16+
return Arrays.asList("com.google.common.base.Optional", "java.util.Optional")
17+
.contains(jtype.getRawClass().getCanonicalName()) || jtype.isReferenceType();
1818
}
1919

2020
/**

0 commit comments

Comments
 (0)