-
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
Duplicate AsyncAPI channel entry for public suspending function in Kotlin #705
Comments
Welcome to Springwolf. Thanks a lot for reporting your first issue. Please check out our contributors guide and feel free to join us on discord. |
Co-authored-by: David Müller <[email protected]>
Hi @ivo-leonov Thank you for the well described issue report! We tried to re-produce the issue, but were not successful. What are we missing? |
Co-authored-by: David Müller <[email protected]>
Dear @timonback, but the topic name and the group name should still be taken from the @KafkaListener annotation, unless you will provide attribute for them in the @AsyncListener annotation example: @AsyncListener( the generated asyncAPI has : "channels": { My Best Regards |
Dear @timonback, My Best Regards |
Hi @fcmdeveloper1, Have a look at https://www.springwolf.dev/docs/configuration/documenting-messages#unwrapping-the-payload and/or modify one of the springwolf-examples so that your issue is easily reproducible. |
@ivo-leonov Any details? |
I created a reproducer here: https://github.com/F43nd1r/springwolf-issue-705-reproducer Generated docs.yaml contains: operations:
my-topic_send_publishMessage:
action: send
channel:
$ref: "#/channels/my-topic"
title: my-topic_send
description: Auto-generated description
bindings: {}
messages:
- $ref: "#/channels/my-topic/messages/com.faendir.springwolfissue705reproducer.MyMessage"
my-topic_send_publishMessage$suspendImpl:
action: send
channel:
$ref: "#/channels/my-topic"
title: my-topic_send
description: Auto-generated description
bindings: {}
messages:
- $ref: "#/channels/my-topic/messages/com.faendir.springwolfissue705reproducer.MyMessage" The second is a synthetic method and should not be considered. |
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 bug
Annotating a public suspending function in Kotlin with @AsyncListener and/or @AsyncPublisher leads to two channel entries instead of one. Making the annotated method private or removing the
suspend
keyword resolves the issue. Both workarounds are suboptimal, as they require changing the code design.Dependencies and versions used
springwolf-core
andspringwolf-ui
version1.1.0
.Code example
Kotlin class:
application.yaml:
pom.xml:
Stack trace and error logs
The text was updated successfully, but these errors were encountered: