To solve the issue you just need to add the following to the ResponseBodyAdvice implemented class, at @ControllerAdvice annotation you just need to define the base package of your application directory, so this won't return a null when calling the swagger-ui url.
For example, have a look at first line @ControllerAdvice annotation input parameter
@ControllerAdvice("com.main.abc.package")
public class AdapterAdvice implements ResponseBodyAdvice