-
Notifications
You must be signed in to change notification settings - Fork 80
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
Springwolf UI - Error parsing AsyncAPI message of channel io.eventuate.tram.spring.springwolf.events.Customer: Cannot read properties of undefined (reading '$ref') #1216
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. |
It seems that the UI requires messages to have a |
Hi @cer, In the latest revision (2), springwolf-ui renders the messages and operations, only the binding is missing. You probably want to add one of binding annotations, see: https://www.springwolf.dev/docs/configuration/documenting-bindings/ Indeed, |
@timonback Yes revision (2) worked. I will work on adding bindings. The AsyncAPI doc is generated by an Eventuate-specific SpringWolf plugin - https://github.com/eventuate-platform/eventuate-tram-spring-wolf-support/ Thanks for the link to https://github.com/springwolf/springwolf-core/blob/master/springwolf-ui/src/app/models/message.model.ts - the challenge is that the UI is generating difficult to debug errors on AsyncAPI docs that are valid according to |
Here's a different doc - https://gist.github.com/cer/cba0099872915d8ec16fd89d0c7209d0 SpringWolf UI seems require the reply channel to have an AFAIK this contradicts the specification for operation reply objects
Thoughts? |
Hi @cer, We started looking into how to validate the provided AsyncAPI files in springwolf-ui (#1219), so that better error messages are being displayed in the browser console as Regarding your second question of springwolf-core/springwolf-examples/springwolf-stomp-example/src/test/resources/asyncapi.json Lines 266 to 275 in ee447fb
We address your concern by writing the address always to the |
I'm a bit confused about what you are asking. The spec says that this is specified using the
Moreover, the specification for operation reply objects says:
In other words, the reply channel's
Please clarify. PS. I'm a bit confused by the fact that |
Hi @cer, Springwolf currently covers request/reply semantics for fixed channel names. My personal impression is that the AsyncAPI spec allows to describe the same thing in multiple different APIs. For the Springwolf use-case, we could use the
Since you use a runtime expression, the current Springwolf approach might not work (haven't read the spec in depth).
Before we did not encounter this case, however I agree that
The spec is specified using json-schema and some spectral rules. My personal impression is that it covers the structure of the document, but not everything (semantical). AsyncAPI studio/validate does show some errors in invalid specifications, but not all. Is it fair to re-word the current bug description to the following or is there something else missing?
|
I think this is about right. However, there is an issue I reported earlier about the UI requiring message name/title/headers: #1216 (comment) As far as I can tell the spec says they are optional - perhaps the UI should not require them. |
My service generates this Async API doc: https://gist.github.com/cer/ca1f729dbbc40ee417616d9e3dcefd59
https://studio.asyncapi.com/ says that it is valid.
But Springwolf UI displays the error
No operations are displayed.
I did notice, btw, that Springwolf UI requires channels to have an address property - otherwise the error message shows undefined as the channel name.
Suggestions?
The text was updated successfully, but these errors were encountered: