-
Notifications
You must be signed in to change notification settings - Fork 77
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
AsyncListener/AsyncPublisher supports ElementType.TYPE #865
Comments
Hi @madrimas, Just to double check, adding the annotation on the class level, would scan all containing methods of the class. Also, all methods would have the same configuration (channel name, bindings, description, while the payload can be extracted from the concrete method signature). Actually, Springwolf has this already in mind. Line 28 in 07e38d9
In the case of Line 59 in ef4c28c
We are happy to assist either on GitHub or on Discord with the implementation of this feature request. |
Just letting you know. Therefore, we do not plan to make development in this area (at least for now). Thanks for your help! |
Implemented as part of #964 |
The change is staged for release and will be part of the next release. If you want to try and verify it in your application today, Thank you for the report/contribution! |
The change is available in the latest release. 🎉 Thank you for the report/contribution and making Springwolf better! |
Describe the feature request
AsyncListener/AsyncPublisher should support ElementType.TYPE as a target.
Motivation
In typical projects listeners/publishers are independent beans with dedicated methods for consuming/producing. However, sometimes (In bigger projects) the mechanism for consuming/producing are hidden in SDK/libraries. In that cases only simple POJO classes are representative for consuming/producing in the service. Due to that the mentioned annotations should be placed on class level.
Technical details
Supports for both - method and class - level should be implemented. If supporting both levels at the same time would be to painful, please think about parameter to control the behavior.
Describe alternatives you've considered
I tried to implement the feature as an extension to Springwolf. In fact, adding support to annotate POJO classes is quite simple (however maintaining the extension - with upgrading Springwolf itself - would be painful) but I occunterd problems where annotated classes are not so simple as POJO (e.g. beans). In that cases too deep type resolving are executed and in the end processing is broken with NPE from org.springdoc.core.converters.SchemaPropertyDeprecatingConverter#resolve (resolvedSchema is null).
Maybe supports only for POJO class level would be a good option at least at the start.
What do you think about such feature? Do you see it possible?
The text was updated successfully, but these errors were encountered: