-
-
Notifications
You must be signed in to change notification settings - Fork 233
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
Incorrect path resolving for absolut paths under windows #311
Comments
Fixed in v10.1.0 |
i have the same error with v10.1.0, i install the packages on pnpm
|
Apologies I meant 11, can you try latest? |
@jonluca thanks for your response, but i do not use the apidevtools+json-schema-ref-parser directly, i use the
how can i do? By the way, i install the packages with pnpm, will i rebuild the openapi-typescript-codegen myself? |
Can confirm version 11 is working. Thanks for the fix! @janiu-001 You can override the nested dependency via https://docs.npmjs.com/cli/v10/configuring-npm/package-json#overrides in your own project. No need to rebuild the openapi-typescript-codegen stuff |
Hello everyone,
unfortunately I noticed that the resolving of absolute paths under windows is not working for me. The code doesn't seem to recognize that a absolute path is entered and prepends another absolute path.
I tracked the error down to this function (https://github.com/APIDevTools/json-schema-ref-parser/blob/main/lib/util/url.ts#L177). Both checks
hasProjectDir
andhasProjectUri
evaluate to false as my api.yaml isn't part of this project.projectDir
evaluates toC:\Projekte\projectname\node_modules\@apidevtools\json-schema-ref-parser\dist\
in my setup but onlyC:\Projekte\projectname
is shared between the library and the source code of the project.It would be great if the problem could be fixed!
Here is also the stacktrace where you can see, what happend to the absolute path.
Used version of apidevtools:
"@apidevtools/json-schema-ref-parser": "10.1.0"
The text was updated successfully, but these errors were encountered: