You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
failed to load OpenAPI specification from './/path/to/your/openapi-specification.yaml': open .//path/to/your/openapi-specification.yaml: no such file or directory
the path are prefixed with ./ and the file are found on local folder.
Hello,
I try to start openapi-mock with a locale specification file.
the file are not in the same folder (another mount point).
file configuration
Start command
./openapi-mock serve -c my-mock-config.yaml
Error
the path are prefixed with ./ and the file are found on local folder.
I think it's due to this line .
the
filepath.Dir(filename) + "/" +
prefix should be conditioned on the presence of a / at the beginning of the path to avoid this case.shouldn't the function
specificationURLIsRelativeFilename
only test if the path starts with ./ to validate a relative path?A priori this self-correction does not seem necessary. Maybe checking the existence of the file with
os.Stat(filename)
can be enough ?The text was updated successfully, but these errors were encountered: