quarkus-scala3 icon indicating copy to clipboard operation
quarkus-scala3 copied to clipboard

Future[T] and Promise[T] as Controller ReturnTypes

Open domdorn opened this issue 1 year ago • 7 comments

This PR adds support for Future[T] and Promise[T] as return types in resources, e.g.


@Path("/")
class GreetingResource() 
    @GET
    @Path("/greet/promise")
    def promiseGreeting(): Promise[String] =
      Promise.successful("Hello from the promise")
    end promiseGreeting
end GreetingResource

I also added tests in the integration module and converted them to be in Scala

domdorn avatar May 09 '24 14:05 domdorn