Skip to content

Commit 97ea49e

Browse files
fix(respect): generate-arazzo with provided folder path (#2000)
1 parent 1ac4029 commit 97ea49e

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

.changeset/happy-impalas-matter.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@redocly/respect-core": patch
3+
"@redocly/cli": patch
4+
---
5+
6+
Fixed `generate-arazzo` command to properly handle output file paths. The `output-file` parameter must have a value when provided.

packages/cli/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -954,6 +954,7 @@ yargs
954954
alias: 'o',
955955
describe: 'Output File name.',
956956
type: 'string',
957+
requiresArg: true,
957958
},
958959
});
959960
},

packages/respect-core/src/handlers/generate.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ export async function handleGenerate({ argv }: CommandArgs<GenerateArazzoFileOpt
2828
'\n' + blue(`Arazzo description ${yellow(fileName)} successfully generated.`) + '\n'
2929
);
3030
} catch (_err) {
31-
exitWithError('\n' + '❌ Arazzo description generation failed.');
31+
exitWithError(
32+
'\n' +
33+
'❌ Failed to generate Arazzo description. Check the output file path you provided, or the OpenAPI file content.'
34+
);
3235
}
3336
}

0 commit comments

Comments
 (0)