Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path replace has bug in window. #18

Open
cxyxc opened this issue Apr 22, 2019 · 1 comment
Open

Path replace has bug in window. #18

cxyxc opened this issue Apr 22, 2019 · 1 comment

Comments

@cxyxc
Copy link

cxyxc commented Apr 22, 2019

Thanks for this project!

This line has bug in windows. Please fix it.Thanks.

https://github.com/fmvilas/openapi3-generator/blob/37231cfc8fb3bfde3320bc4fcf832dc84f35ccfb/lib/generator.js#L70

Maybe can use this.
const subdir = config.root.replace(config.templates_dir, '.');

@fmvilas
Copy link
Collaborator

fmvilas commented Apr 23, 2019

Hi @cxyxc. I don't think there's a bug with this line but instead, the bug with Windows may be in many different places because we're using / instead of \ as directory separators.

I think the root cause may be here (and probably in more places): https://github.com/fmvilas/openapi3-generator/blob/37231cfc8fb3bfde3320bc4fcf832dc84f35ccfb/lib/generator.js#L303

Can you please fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants