Open
Description
Currently the only solution that allows HATEOAS to interoperate with suspend
coroutine functions is to wrap all output into Mono
and Flux
(Flow
seems to work for some reason too, but it's probably a bad idea to use it without understanding why it works).
In short, implement the following prototype:
fun <reified T> WebFluxLinkBuilder.linkTo(block: suspend T.() -> Any?)
I realize now there's a second problem identified here, which is that the boilerplate for methodOn
can be eliminated with reified generics in Kotlin. Perhaps another task can be to add Kotlin extensions when possible?