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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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
CompletionStagewhich makes it bothersome to use in Quarkus because you need to convertUnitoCompletionStagemost of the time.However, I'm a bit confused why the intermediary layer would generate endpoint annotations like
@POSTand@Path.My second question is about Mutiny support. Currently, when I set
quarkus.openapi.generator.reactive=true, it generates methods withCompletionStagereturn 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 betweenUniandCompletionStage. For example gRPC generator generates code that returnsUnidirectly, which is more convenient.Could someone clarify these points for me?
Beta Was this translation helpful? Give feedback.
All reactions