Open ms14981 opened 1 year ago
Absolute paths works fine on unix environments.
node src/index.js forge <schema> /home/X/repos/openapi-forge-java-initial/ -o ...
runs without issues.
About the windows side of things, my guess is fs.existsSync on windows native directories in git-bash doesn't get validated correctly maybe. For the git error part, the path is still validated as an URL which triggers that as a git repo automatically to be fetched with git.
Testing the schema argument, looks like that doesn't work with absolute paths either:
openapi-forge forge C:/dev/open-api-forge/openapi-forge-java-initial/features/schema.json https://github.com/ScottLogic/openapi-forge-typescript.git
We get this error (from node-fetch?): "Only absolute URLs are supported"
Tried to run the following command (on Git Bash):
It gives the error:
There are a couple of things to consider here: