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 f421112 commit 76a0637Copy full SHA for 76a0637
bin/cli.js
@@ -108,7 +108,7 @@ async function generateSchema(pathToSpec) {
108
let outputFilePath = new URL(flags.output, CWD); // note: may be directory
109
const isDir = fs.existsSync(outputFilePath) && fs.lstatSync(outputFilePath).isDirectory();
110
if (isDir) {
111
- const filename = pathToSpec.replace(EXT_RE, ".ts");
+ const filename = pathToSpec.replace(EXT_RE, ".ts").replace(/^https?:\/\//, '');
112
outputFilePath = new URL(filename, outputFilePath);
113
}
114
0 commit comments