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
Add meta->schema validation warning #1211
Conversation
optimade/validator/validator.py
Outdated
request_str: str, | ||
): | ||
"""Tests that the endpoint responds with a `meta->schema`.""" | ||
if not response.json().get("meta", {}).get("schema"): |
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.
Would it be worthwhile to test the schema field further? For example, by testing whether it is a valid url, and that there indeed is a schema at that url?
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.
I don't think so, there was some discussion that the meta->schema
just needs to be a URI rather than a URL, I have just used URL here for the config name.
This is blocked by the other PR that introduces the relevant config, after which the tests here should pass. |
79f25e0
to
1dcf201
Compare
Codecov Report
@@ Coverage Diff @@
## master #1211 +/- ##
==========================================
+ Coverage 91.23% 91.32% +0.08%
==========================================
Files 72 72
Lines 4299 4309 +10
==========================================
+ Hits 3922 3935 +13
+ Misses 377 374 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
LGTM
db6dbcc
to
a951698
Compare
Closes #1209