Skip to content

Commit 1baef62

Browse files
committed
LISt处理
1 parent c2616c3 commit 1baef62

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

apidoc-core/src/main/java/com/ztianzeng/apidoc/ModelResolver.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,19 @@ public Schema resolve(AnnotatedType annotatedType,
192192
&& ("T".equals(field.getType().getGenericFullyQualifiedName())
193193
|| "java.lang.Object".equals(field.getType().getGenericFullyQualifiedName())
194194
)) {
195-
propSchema.set$ref(constructRef(findName(genericityContentType)));
195+
if (DocUtils.isList(genericityContentType.getBinaryName())) {
196+
aType = new AnnotatedType()
197+
.javaClass(genericityContentType)
198+
.parent(schema)
199+
.resolveAsRef(annotatedType.isResolveAsRef())
200+
.jsonViewAnnotation(annotatedType.getJsonViewAnnotation())
201+
.skipSchemaName(true)
202+
.schemaProperty(true)
203+
.propertyName(targetClass.getName());
204+
propSchema = context.resolve(aType);
205+
} else {
206+
propSchema.set$ref(constructRef(findName(genericityContentType)));
207+
}
196208
} else if (genericityContentType != null && DocUtils.isList(type.getBinaryName())) {
197209
aType = new AnnotatedType()
198210
.javaClass(genericityContentType)

0 commit comments

Comments
 (0)