-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
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
fix: support for yaml file references #179
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #179 +/- ##
=======================================
Coverage ? 76.16%
=======================================
Files ? 24
Lines ? 1867
Branches ? 0
=======================================
Hits ? 1422
Misses ? 355
Partials ? 90 ☔ View full report in Codecov by Sentry. |
fileExt := filepath.Ext(fileName) | ||
if fileExt != ".json" { | ||
return nil, fmt.Errorf("%w: '%s', only json schema files are allowed", ErrUnsupportedRefExtension, fileExt) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The call to g.fileLoader.Load
is already checking for supported file extensions https://github.com/omissis/go-jsonschema/blob/main/pkg/schemas/loaders.go#L143-L149, hence it seems unnecessary to perform this check here again.
3038ed0
to
59f9e05
Compare
hey @johanneswuerbach , thanks for the PR, I will check it as soon as I can (probably during the xmas holidays) 🙏 |
@omissis any chance we could get a new release with this PR and the latest main? |
@johanneswuerbach I guess that could be done :) |
@johanneswuerbach et voilà, fresh out of the oven -> https://github.com/omissis/go-jsonschema/releases/tag/v0.15.0 |
#153 broke the support for yaml references.
This PR fixes it and adds a tests.