Skip to content

Commit 54a1953

Browse files
author
bnasslahsen
committed
Spring Hateoas - Extending EntityModel. Fixes #798
1 parent 108916f commit 54a1953

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

springdoc-openapi-hateoas/src/main/java/org/springdoc/hateoas/converters/CollectionModelContentConverter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ public Schema<?> resolve(AnnotatedType type, ModelConverterContext context, Iter
8686
*/
8787
private Class<?> getEntityType(AnnotatedType type) {
8888
Class<?> containerEntityType = ((CollectionType) (type.getType())).getContentType().getRawClass();
89-
if (containerEntityType.isAssignableFrom(EntityModel.class)) {
90-
TypeBindings typeBindings = ((CollectionType) type.getType()).getContentType().getBindings() ;
89+
if (EntityModel.class.isAssignableFrom(containerEntityType)) {
90+
TypeBindings typeBindings = ((CollectionType) type.getType()).getContentType().getBindings();
9191
if (!CollectionUtils.isEmpty(typeBindings.getTypeParameters()))
9292
return typeBindings.getBoundType(0).getRawClass();
9393
}

0 commit comments

Comments
 (0)