Closed davidsonsns closed 3 years ago
@davidsonsns nice investigation. Do you open a pull request for that changes?
@anymaniax I was opening rn š plz let me know ur thots
@anymaniax I was opening rn š plz let me know ur thots
I am still getting this error today api - Error: ENOENT: no such file or directory, open 'C:\Users\xxx\source\repos\ABC\Sample\src\ABC.Sample.ClientApp\https:\localhost:7108\swagger\v1\swagger.json'
I have updated this again and I think it fixes all scenarios: https://github.com/anymaniax/orval/pull/1032
What are the steps to reproduce this issue?
http://localhost:6001/swagger/v1/swagger.json
What happens?
validator.js doesn't recognize
localhost:${PORT}
as a valid URL and ORVAL concatenates it with the current path and throws the exception below:What were you expecting to happen?
recognize
localhost
as a valid URLAny other comments?
found a couple of PR opened on validator.js repository regarding this behavior: https://github.com/validatorjs/validator.js/issues?q=isurl+localhost so, my guess is that we could improve it
if (isString(path) && !isUrl(path)) {
toif (isString(path) && !isUrl(path, { require_tld: false })) {
What versions are you using?
Operating System: macOS Big Sur Version 11.6 Package Version:
^6.1.1
Browser Version: ā¦