snowdrop-zen / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
1 stars 0 forks source link

Wrong content-type when using Kotlin coroutines in RESTEasy Reactive #365

Closed snowdrop-bot closed 3 years ago

snowdrop-bot commented 3 years ago

Describe the bug

I have changed a web endpoint from returning a Mutiny Uni to using a suspend function.

Expected behavior

I would expect that the content type stays the same (application/json)

Actual behavior

The content-type is application/octet-stream

To Reproduce

Returns application/json:

@Path("/test")
class TestController{

    @GET
    fun test() = Uni.createFrom().item(MyObject("hello"))
}

data class MyObject(val test:String)

Returns application/octet-stream:

@Path("/test")
class TestController{

    @GET
    suspend fun test() = MyObject("hello")
}

data class MyObject(val test:String)

https://github.com/quarkusio/quarkus/issues/18145


$upstream:18145$