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

[BUG] incorrect x-parser-schema-id when having multiple files #1063

Open
2 tasks done
DanielRamosAcosta opened this issue Nov 17, 2024 · 1 comment
Open
2 tasks done
Labels
bug Something isn't working

Comments

@DanielRamosAcosta
Copy link

DanielRamosAcosta commented Nov 17, 2024

Describe the bug.

I am encountering an issue with my asyncapi.yml file, which references schemas located in another file. When I generate the models, the generator creates generic names like AnonymousSchema_1, AnonymousSchema_2, AnonymousSchema_3, and so on for each schema in the referenced file.

After investigating the problem, I discovered that it seems to stem from the parser. Specifically, the x-parser-schema-id field in the AsyncAPIDocumentInterface object is returning values like <anonymous-schema-1>.

Expected behavior

I would expect the generated models to have the right name.

Screenshots

image
image

How to Reproduce

I will leave a PR that reproduces the error with tests.
I can try fixing the error, but I need guidance here.

Here is the reproduction: #1064

🥦 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 ?

Yes I am willing to submit a PR!

@DanielRamosAcosta DanielRamosAcosta added the bug Something isn't working label Nov 17, 2024
Copy link

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.

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

1 participant