Spring supports returning CompletableFutures for mappings marked with @Async. Should be pretty similar to https://github.com/springdoc/springdoc-openapi/issues/297.