The usage of server generator #749
Unanswered
zZHorizonZz
asked this question in
Q&A
Replies: 1 comment
-
cc @carlesarnal |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I have a few questions about how to use the server stubs within an application.
From my understanding, based on this issue #670 (comment), the stubs generated from OpenAPI specs should act as an intermediary layer (At least in Quarkus). This means you shouldn't use them directly at the endpoint definition level. I came to this conclusion because it seems you can't return specific Response types (like a 201 Created status) directly from the stubs and also reactive stubs use
CompletionStage
which makes it bothersome to use in Quarkus because you need to convertUni
toCompletionStage
most of the time.However, I'm a bit confused why the intermediary layer would generate endpoint annotations like
@POST
and@Path
.My second question is about Mutiny support. Currently, when I set
quarkus.openapi.generator.reactive=true
, it generates methods withCompletionStage
return types (Although for me it just doesn't seem to work for some reason). If I wanted to use Mutiny, I would need to convert betweenUni
andCompletionStage
. For example gRPC generator generates code that returnsUni
directly, which is more convenient.Could someone clarify these points for me?
Beta Was this translation helpful? Give feedback.
All reactions