Skip to content
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

Message details (payload) not rendered correctly when $ref is used in channels #204

Open
AMulgrave opened this issue Jan 11, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@AMulgrave
Copy link

asyncapi.yaml.txt

Loading the yaml attachment into VS Code renders as follows:

asyncapi preview render

Note the missing payload details for the channels messages using $ref.

While the same yaml renders correctly in Web Studio beta:

Asyncapi Studio beta render

The rendering is also incomplete when the channels messsages are $ref to external asyncapi yaml files.

@AMulgrave AMulgrave added the bug Something isn't working label Jan 11, 2024
@ivangsa
Copy link
Collaborator

ivangsa commented Jan 11, 2024

Hi @AMulgrave

thanks for taking the time to report this

You are right, this asyncapi.yml file renders alright in https://studio.asyncapi.com/
but it fails to render in vscode.

I will need to investigate further.

@ivangsa
Copy link
Collaborator

ivangsa commented Jan 19, 2024

Hi @AMulgrave

we have investigates this issue, and we a reporting it to the react-component upstream...

Any way, you can simplify your asyncapi.yml definition without loosing any readability or reusability, for instance placing the channels section as first child (instead of inside components) would solve this rendering problem... I'm not sure what advantage you see in that indirection from channels -> component/channels

image

@ashmit-coder
Copy link

HI @ivangsa ,
was working on the same issue and found the same cause.
Just wanted to ask if have you created a issue for it, If so could you please refrence it here.

In the case you haven't I would like to work towards it.

@ivangsa
Copy link
Collaborator

ivangsa commented Jan 19, 2024

@ashmit-coder please, go ahead an create a PR!
Out of curiosity, if you can share the details of what it's about..

@ashmit-coder
Copy link

Out of curiosity, if you can share the details of what it's about..
sure i wiill i need to look into to the working of the asycapi-react project. i will share my findings as soon as possible

@AMulgrave
Copy link
Author

Hi @AMulgrave

we have investigates this issue, and we a reporting it to the react-component upstream...

Any way, you can simplify your asyncapi.yml definition without loosing any readability or reusability, for instance placing the channels section as first child (instead of inside components) would solve this rendering problem... I'm not sure what advantage you see in that indirection from channels -> component/channels

image

This is just an example to show the issue from a single file. In my project the channel definitions are in an external file.

@ashmit-coder
Copy link

Hi @AMulgrave
we have investigates this issue, and we a reporting it to the react-component upstream...
Any way, you can simplify your asyncapi.yml definition without loosing any readability or reusability, for instance placing the channels section as first child (instead of inside components) would solve this rendering problem... I'm not sure what advantage you see in that indirection from channels -> component/channels
image

This is just an example to show the issue from a single file. In my project the channel definitions are in an external file.

Could you please provide aother image this one is not visible

@AMulgrave
Copy link
Author

In practice, I have the yaml structured that way to provide links to external yaml definitions. For simplicity, I provided the example to show the issue in one yaml file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants