If a bean contains a circular reference, the DefaultModelDependencyProvider will never end with a scan of the parameter, due to endless looping over the entity.
i can submit a feature / bug fix for that if i get the rights. the additions for DefaultModelDependencyProvider are very easy.
once you track complex types as well,
private boolean isComplexType(ModelContext modelContext) {
return !isBaseType(modelContext);
}
you can simply avoid endless scans by adding a check, if the complex type has been processed within the current context:
// TODO: one should mark not only base types, but rather complex types as well, since you will benefit from the recursion break with back referenced objects.
if (isComplexType(ModelContext.fromParent(modelContext, resolvedType))) {
if(modelContext.hasSeenBefore(resolvedType)){
return new HashSet<>();
}
LOG.debug("Marking complex type {} as seen", resolvedType.getSignature());
modelContext.seen(resolvedType);
}
since i am not very familiar with all the rest that is involved, i could imagine this fix may break certain things. thus, it would be nice if you could have a quick look at it.

If a bean contains a circular reference, the DefaultModelDependencyProvider will never end with a scan of the parameter, due to endless looping over the entity.
i can submit a feature / bug fix for that if i get the rights. the additions for DefaultModelDependencyProvider are very easy.
once you track complex types as well,
private boolean isComplexType(ModelContext modelContext) {
return !isBaseType(modelContext);
}
you can simply avoid endless scans by adding a check, if the complex type has been processed within the current context:
// TODO: one should mark not only base types, but rather complex types as well, since you will benefit from the recursion break with back referenced objects.
if (isComplexType(ModelContext.fromParent(modelContext, resolvedType))) {
if(modelContext.hasSeenBefore(resolvedType)){
return new HashSet<>();
}
LOG.debug("Marking complex type {} as seen", resolvedType.getSignature());
modelContext.seen(resolvedType);
}
since i am not very familiar with all the rest that is involved, i could imagine this fix may break certain things. thus, it would be nice if you could have a quick look at it.