-
-
Notifications
You must be signed in to change notification settings - Fork 535
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
Behavior change for relative input path in 0.26.0 #1970
Comments
I am also experiencing this issue |
same issue. |
apidevtools/json-schema-ref-parse#311 the issue seems to be related to this one. |
Seems indeed a json-schema-ref-parse issue, checking now |
Easy solution for now, would be to revert |
Created a new release (0.27.0) https://github.com/ferdikoomen/openapi-typescript-codegen/releases/tag/v.027.0 please check if that resolves the issue |
It doesn't fix the issue. |
This comment was marked as outdated.
This comment was marked as outdated.
Looking at the https://github.com/APIDevTools/json-schema-ref-parser/blob/main/lib/index.ts#L58 |
I should also note that, even if I pass an absolute path to --input, it still tries to append that to The only workaround I can come up with is to use Curious how other people are getting this to work without the above hack, as otherwise the library appears to be unusable when using an input file. (Of course, downgrading is also an option, but not a nice one.) |
I was on 0.27.0 when I was getting this error. Downgraded to 0.25.0, worked perfect |
We had to downgrade too, tried the absolute path and overriding to the latest version of json-schema-ref-parser (11.1.0), still it just appends the absolute path to the package folder, really odd way of handling paths, wondering how this works for anyone. |
This problem occured on Windows but not macOS, downgrading the package to 0.25 fixed it. |
Still not working, had to downgrade to 0.25.0 |
Upgrading to the latest version of |
@StanlyLife we've got a different fix for this in @nicolas-chaulet/openapi-typescript-codegen, could you give it a try and let me know if it works for you? |
@mrlubos Is there any reason why you are maintaining a fork, is this repo dead? |
@AnderssonPeter this should answer that question https://github.com/nicolas-chaulet/openapi-typescript-codegen?tab=readme-ov-file#why-the-fork |
This appears to be fixed now in 0.28.0. |
After updating from 0.25.0 to 0.26.0, a relative path passed to the input parameter is resolved from the "node_modules@apidevtools\json-schema-ref-parser" folder instead of from the project folder where the command is being run.
Example command:
It tries to read from
and gives an error that it cannot find that file (because the file is actually under my project folder).
The text was updated successfully, but these errors were encountered: