generator icon indicating copy to clipboard operation
generator copied to clipboard

generate function breaks functionality of Generator

Open magicmatatjahu opened this issue 2 years ago • 2 comments

Describe the bug

If someone will run generate(...AsyncAPIDocument) function then some hooks like this https://github.com/asyncapi/generator-hooks/blob/master/src/index.js#L5 won't work, because originalAsyncAPI is empty (undefined).

How to Reproduce

Try to generate https://github.com/asyncapi/nodejs-template by generate() function and you should have problem like:

The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined

throw by that line https://github.com/asyncapi/generator-hooks/blob/master/src/index.js#L28

Expected behavior

generate function should works. We should pass originalAsyncAPI as second argument to that function by object like:

generate(parsedDocument, { originalAsyncAPI })

magicmatatjahu avatar Jan 20 '22 15:01 magicmatatjahu

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

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 :heart:

github-actions[bot] avatar May 21 '22 00:05 github-actions[bot]

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

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 :heart:

github-actions[bot] avatar Sep 20 '22 00:09 github-actions[bot]

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

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 :heart:

github-actions[bot] avatar Jan 20 '23 00:01 github-actions[bot]