Closed ScienceOfficer closed 5 months ago
Fixed in v10.1.0
i have the same error with v10.1.0, i install the packages on pnpm
\.pnpm\\@apidevtools+json-schema-ref-parser@10.1.0\\node_modules\\@apidevtools\\json-schema-ref-parser\\dist\\.\\packages\\elderly-care\\common\\s
rc\\apidocs\\openapi.json+ERESOLVER+Error opening file
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 openapi-typescript-codegen
, and it depend on the v10.1.0,
"dependencies": {
"@apidevtools/json-schema-ref-parser": "^11.1.0",
"camelcase": "^6.3.0",
"commander": "^11.1.0",
"fs-extra": "^11.2.0",
"handlebars": "^4.7.8"
},
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"