Skip to content

Commit

Permalink
fix removed property
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaslagoni committed Sep 28, 2023
1 parent 918558e commit 1743fa8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ class Generator {
if (!isAlreadyParsedDocument && !isParsableCompatible) {
throw new Error('Parameter "asyncapiDocument" must be a non-empty string or an already parsed AsyncAPI document.');
}
this.asyncapi = asyncapiDocument;
this.asyncapi = this.originalAsyncAPI = asyncapiDocument;

if (this.output === 'fs') {
xfs.mkdirpSync(this.targetDir);
Expand Down
1 change: 1 addition & 0 deletions test/generator.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ describe('Generator', () => {
expect(filtersRegistry.registerFilters).toHaveBeenCalled();
expect(templateConfigValidator.validateTemplateConfig).toHaveBeenCalled();
expect(gen.launchHook).toHaveBeenCalledWith('generate:after');
expect(gen.originalAsyncAPI).toBe(dummyYAML);
});

it('fails if input is not a string nor a parsed AsyncAPI document', async () => {
Expand Down

0 comments on commit 1743fa8

Please sign in to comment.