Skip to content

Add support for kotlin coroutine suspend functions to WebFluxLinkBuilder #1285

Open
@sgarfinkel

Description

@sgarfinkel

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions