Open snisar opened 1 year ago
Which generator version are you using?
Em qui., 2 de fev. de 2023 12:27, Saquib Nisar @.***> escreveu:
I and a colleague have both started encountering this error when trying to generate API's.
Error on API generation from http://localhost:5000/swagger/v1/swagger.json: ResolverError: Error downloading http://localhost:5000/swagger/v1/swagger.json fetch failed
Browsing to the file specified in the error above works fine.
If I change the location to a file in a directory, that also does not work.
config file: "input": "c:/temp/swagger.json", "output": "app/api", "ignoreUnusedModels": false }
Output
Error on API generation from c:/temp/swagger.json: ResolverError: Error opening file @. \json-schema-ref-parser\c:\temp\swagger.json" ENOENT: no such file or directory, open @. \json-schema-ref-parser\c:\temp\swagger.json'
Not sure what has changed to cause these errors.
— Reply to this email directly, view it on GitHub https://github.com/cyclosproject/ng-openapi-gen/issues/261, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJA76LW6ZNK4OIKUZOOBXTWVPG5ZANCNFSM6AAAAAAUPFL2ZU . You are receiving this because you are subscribed to this thread.Message ID: @.***>
0.23.0
It should be something with the Windows syntax (somehow it is trying c:/temp/swagger.json
as a relative path).
I don't use Windows myself, and can't help so much more with this... Sorry.
I and a colleague have both started encountering this error when trying to generate API's.
Error on API generation from http://localhost:5000/swagger/v1/swagger.json: ResolverError: Error downloading http://localhost:5000/swagger/v1/swagger.json fetch failed
Browsing to the file specified in the error above works fine.
If I change the location to a file in a directory, that also does not work.
config file:
{"input": "c:/temp/swagger.json", "output": "app/api", "ignoreUnusedModels": false }
Output
Error on API generation from c:/temp/swagger.json: ResolverError: Error opening file "F:\AgVentory\ClientApp\node_modules\@apidevtools\json-schema-ref-parser\c:\temp\swagger.json" ENOENT: no such file or directory, open 'F:\AgVentory\ClientApp\node_modules\@apidevtools\json-schema-ref-parser\c:\temp\swagger.json'
Not sure what has changed to cause these errors.