From c1e1b39d2f5c0642bf9b458b8a52d1cd5739945b Mon Sep 17 00:00:00 2001 From: Jan Date: Tue, 16 Jul 2024 09:54:06 +0200 Subject: [PATCH] fix: generating fromTemplate with refs in spec (#945) Co-authored-by: asyncapi-bot %0ACo-authored-by: Lukasz Gornicki --- src/commands/generate/fromTemplate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/generate/fromTemplate.ts b/src/commands/generate/fromTemplate.ts index 58b0d782391..9db538cca51 100644 --- a/src/commands/generate/fromTemplate.ts +++ b/src/commands/generate/fromTemplate.ts @@ -265,7 +265,7 @@ export default class Template extends Command { const s = interactive ? spinner() : { start: () => null, stop: (string: string) => console.log(string) }; s.start('Generation in progress. Keep calm and wait a bit'); try { - await generator.generateFromString(specification.text(), genOption); + await generator.generateFromString(specification.text(), {...genOption, path: asyncapi}); } catch (err: any) { s.stop('Generation failed'); throw new GeneratorError(err);