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

AsyncAPI 3.0.0 preview doesn't work when referencing local avro files #238

Open
2 tasks done
JuanPalacios opened this issue Oct 7, 2024 · 8 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@JuanPalacios
Copy link

JuanPalacios commented Oct 7, 2024

Describe the bug.

AsyncAPI 3.0.0 preview doesn't work when referencing local avro files

Expected behavior

AsyncAPI 3.0.0 preview works correctly when referencing local avro files. This functionality with AsyncAPI version 2.6.0 and version 0.5.3 works correctly.

Screenshots

The preview is not displayed:
image

The only error shown in AsyncAPI studio is that it does not support reference to local files, so we understand that the definition is correct.
image

How to Reproduce

  1. We have AsyncAPI 2.6.0 working correctly with plugin version 0.5.3 and references to local avros.

  2. I have created an AsyncAPI 3.0.0 without local avros references and it works correctly with plugin version 0.6.3.

  3. When I add a reference to a local avro the screen goes blank and we can't see the AsyncAPI. It prevents us from continuing with our upgrade process as we cannot see the AsyncAPI at all.

🥦 Browser

None

👀 Have you checked for similar open issues?

  • I checked and didn't find similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to work on this issue ?

No, someone else can work on it

@JuanPalacios JuanPalacios added the bug Something isn't working label Oct 7, 2024
Copy link

github-actions bot commented Oct 7, 2024

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@ivangsa
Copy link
Collaborator

ivangsa commented Oct 7, 2024

Hi @JuanPalacios

thanks for taking the time to report this.
do you mind attaching a zip with the folder structure that is making this fail?

thanks again

@JuanPalacios
Copy link
Author

Here you are!
events-dictionary.zip

@ivangsa
Copy link
Collaborator

ivangsa commented Oct 8, 2024

hi @JuanPalacios

it doesn't find the file because the url is wrong:

image

but even with the right url it doesn't seem to open the preview:

$ref: '../../../../avro/src/main/resources/pre/com/masmovil/commons/avro/provision/broadband/v1/activation/activationstarted.avsc'

I need to investigate

@JuanPalacios
Copy link
Author

Yes, you are right. I was trying other paths, but the rigth one is the one you write.

@ivangsa
Copy link
Collaborator

ivangsa commented Oct 8, 2024

I found why it doesnt render:

this is the proper format to reference avro files

      payload:
        schemaFormat: 'application/vnd.apache.avro;version=1.9.0'
        schema:
          $ref: '../../../../avro/src/main/resources/pre/com/masmovil/commons/avro/provision/broadband/v1/activation/activationstarted.avsc'

but this aliases line in the .avsc is also somehow breaking the parser

// "aliases" : [ "topic.activationStarted", "compatibility.full_transitive" ]

if you comment that line and use the format above you will get the API rendered.

I'm not sure if is not a valida avro schema or the parser does not support aliases

@JuanPalacios
Copy link
Author

wow, very fast, in my opinion the aliases are totally right because we have published this avros in our confluent schema registry, see the image below:

image

@ivangsa
Copy link
Collaborator

ivangsa commented Oct 8, 2024

worth rising an issue/question with the parser project, bc I don't even get the error exception for this, but if I inline the avro inside the asyncapi.yml I get a linting error:

image

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

2 participants