-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Mutiny Return Type on Specific Endpoints #782
Comments
Hi @oben01! That's a great addition to the extension. If you don't mind, can you work on a PR? Cheers! |
Hello @ricardozanini Thank you for the positive feedback! I'd be happy to give it a try and work on a PR for this feature. Additionally, I was thinking of expanding the feature to allow developers to choose between Uni and Multi return types for each endpoint. This would provide even more flexibility depending on whether a single response or a stream of responses is expected from an endpoint. I'll start working on this and keep you updated on my progress! |
What do u thing of something like :
|
Great idea! |
@ricardozanini The PR is ready :) |
@ricardozanini I just forget to run mvn verify to reformat the code sorry about that. could u please run the pipeline again |
Co-authored-by: oussama Dahmaz <dahmaz@MacBook-Pro-de-odahmaz.local>
…quarkiverse#788) Co-authored-by: oussama Dahmaz <dahmaz@MacBook-Pro-de-odahmaz.local>
Great feature, looking forward to use it in the next version. :-) Just a question since my own trial showed that it seems to clash with the feature Would it be possible to have another option that offers to generate it without the response as it does not make much sense, does it? Meaning Multi<byte[]> in my case. I am happy to provide more details if needed. |
Description:
I would like to suggest a feature enhancement for the OpenAPI Generator in Quarkus, specifically regarding the generation of Mutiny-based return types for specific API operations. Currently, it seems that Mutiny support is either globally applied. However, there are use cases where only certain endpoints need to leverage Mutiny’s reactive capabilities.
Proposed Solution:
Introduce the ability to apply Mutiny return types selectively to specific operations within an OpenAPI specification. This can be achieved by adding configuration options that allow developers to specify which endpoints should have Mutiny return types.
Example Configuration:
*if only mutiny=true we continue to apply to all endpoints
Use Case:
Consider an OpenAPI specification, such as the one used in the Swagger Petstore example. If a developer only wants to apply Mutiny return types to the POST /pet endpoint, they could use the configuration above. This allows for granular control, enabling developers to optimize specific parts of their API for reactive processing without globally applying it to all operations.
Expected Outcome:
Feedback Request:
I would appreciate your thoughts on the feasibility of this feature. Are there any potential challenges or considerations that I might have overlooked?
Thank you for considering this enhancement!
The text was updated successfully, but these errors were encountered: