Skip to content

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

Description

@DanielRamosAcosta

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!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions