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

New parser vs Old parser -> how to do traverseSchemas in new api #832

Open
derberg opened this issue Aug 9, 2023 · 9 comments
Open

New parser vs Old parser -> how to do traverseSchemas in new api #832

derberg opened this issue Aug 9, 2023 · 9 comments
Labels
bug Something isn't working stale

Comments

@derberg
Copy link
Member

derberg commented Aug 9, 2023

Old API had https://github.com/asyncapi/parser-js/blob/master/src/old-api/asyncapi.ts#L157

I could do asyncapi.traverseSchemas(generateDiagram); on my parsed AsyncAPI document and iterate over all schemas of the document and pass my custom function inside.

There is nothing about it in https://github.com/asyncapi/parser-js/blob/master/docs/migrations/v1-to-v2.md

I think it is bug, either docs or ?

@derberg derberg added the bug Something isn't working label Aug 9, 2023
@smoya
Copy link
Member

smoya commented Aug 10, 2023

Good catch! We definitely need to add that into the migration guide.

The functionality is still there through traverseAsyncApiDocument btw.

@derberg
Copy link
Member Author

derberg commented Aug 10, 2023

@smoya but the function you refer to is different, I saw it, but it traverses entire document, the one I used was just for schemas

@smoya
Copy link
Member

smoya commented Aug 11, 2023

@smoya but the function you refer to is different, I saw it, but it traverses entire document, the one I used was just for schemas

It works in the same way. It iterates over the types you pass in the function, which by default, are the Schema types.

You have an example of usage here.

@derberg
Copy link
Member Author

derberg commented Sep 28, 2023

@smoya correct me if I'm wrong but I don't think it is exposed by the library.

@derberg
Copy link
Member Author

derberg commented Oct 12, 2023

@smoya pingy pongy

@jonaslagoni
Copy link
Member

😆

@smoya
Copy link
Member

smoya commented Nov 9, 2023

@derberg You are right, we would need to add the proper export to the src/index.ts file.

Regarding this delay in my answer, I can swear to you I "answered" this after your last ping. It feels so embarrassed, the only thing that could happen is that my old laptop (replaced 2 weeks ago) was behaving very bad in terms of lags (keyboard vs screen, etc) because of high temp in the CPU (caused by a known issue in my old model). Maybe I believed I hit the "Comment" button and never did.
I'm very sorry.

Copy link

github-actions bot commented Mar 9, 2024

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@github-actions github-actions bot added the stale label Mar 9, 2024
@smoya smoya removed the stale label Mar 11, 2024
Copy link

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@github-actions github-actions bot added the stale label Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

3 participants