We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
With version 0.30.0, compared to 0.29.4, openapi-validator regressed in way how relative paths are resolved.
I have following folder structure:
src/ api1.yml api2.yml shared/ common.yml
api1.yml and api2.yml files reference some definitions from shared/common.yml, e.g. responses shared/common.yml#/components/responses/NoContent.
api1.yml
api2.yml
shared/common.yml
shared/common.yml#/components/responses/NoContent
If I run validator from other folder than src/ then e.g. lint-openapi src/api1.yml, then error is reported.
src/
lint-openapi src/api1.yml
errors Message : ENOENT: no such file or directory, open 'shared/common.yml' Path : paths./mymethod.post.responses.201.$ref Line : 42
It seems as if relative path is now resolved in respect to current working directory, instead of relatively to specification file being processed.
Earlier versions work fine.
The text was updated successfully, but these errors were encountered:
@fenuks I'm surprised to see this, thank you for reporting the bug.
@jorge-ibm this may have to do with the Spectral integration - do you mind taking a look at it?
Sorry, something went wrong.
No problem. I'm using this program extensively, thank you for all hard work!
And I forgot to mention that running linter from the same directory where processed file is, naturally works as expected.
This issue should be fixed as part of this PR #201
🎉 This issue has been resolved in version 0.30.1 🎉
The release is available on:
Your semantic-release bot 📦🚀
Successfully merging a pull request may close this issue.
With version 0.30.0, compared to 0.29.4, openapi-validator regressed in way how relative paths are resolved.
I have following folder structure:
api1.yml
andapi2.yml
files reference some definitions fromshared/common.yml
, e.g. responsesshared/common.yml#/components/responses/NoContent
.If I run validator from other folder than
src/
then e.g.lint-openapi src/api1.yml
, then error is reported.It seems as if relative path is now resolved in respect to current working directory, instead of relatively to specification file being processed.
Earlier versions work fine.
The text was updated successfully, but these errors were encountered: