We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 477d9a6 commit 550fcaeCopy full SHA for 550fcae
bin/cli.js
@@ -107,7 +107,7 @@ async function generateSchema(pathToSpec) {
107
let outputFilePath = new URL(flags.output, CWD); // note: may be directory
108
const isDir = fs.existsSync(outputFilePath) && fs.lstatSync(outputFilePath).isDirectory();
109
if (isDir) {
110
- const filename = pathToSpec.replace(EXT_RE, ".ts");
+ const filename = pathToSpec.replace(EXT_RE, ".ts").replace(/^https?:\/\//, '');
111
outputFilePath = new URL(filename, outputFilePath);
112
}
113
0 commit comments