Closed nk-rks closed 4 years ago
Hi @nk-rks,
To get your expected result, you can declare DeferredResult as follow;
static {
SpringDocUtils.getConfig().addResponseWrapperToIgnore(DeferredResult.class);
}
Starting from the next release, v1.4.4, it will be added out of the box.
My server supports asynchronous Servlet processing, so it returns entities of type DeferredResult. DeferredResult is a special type which the Servelet recognizes, and extracts from it the type referenced in the DeferredResult definition.
e.g. The pojo is defined with a member of type DeferredResult, and the actual entity returned by the Servlet to the end-user is the type referenced in the DeferredResult definition, e.g. ActualReturnedEntity.
The problem is that sprindoc documents the DeferredResult as DeferredResultActualReturnedEntity. The expectation is for sprindoc to document the referenced entity: ActualReturnedEntity
There was a similar issue with springfox: https://github.com/springfox/springfox/issues/346
spring-boot: 2.0.3 springdoc-openapi: 1.4.3
Sample server code:
Actual result:
Expected results: