-
-
Notifications
You must be signed in to change notification settings - Fork 590
Add id with ref support, solve bug(371). #717
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 id with ref support, solve bug(371). #717
Conversation
Codecov Report
@@ Coverage Diff @@
## master #717 +/- ##
==========================================
+ Coverage 95.25% 95.93% +0.68%
==========================================
Files 18 18
Lines 2716 3541 +825
Branches 320 545 +225
==========================================
+ Hits 2587 3397 +810
- Misses 106 123 +17
+ Partials 23 21 -2
Continue to review full report at Codecov.
|
55d80bb
to
8456a34
Compare
985f32d
to
434ff64
Compare
@Julian Hello, I have tested this PR could solve the following four skipped scenes, at the same time #710 #693 #341 all have been solved.
|
@Julian This PR can fix some skipped test cases. Could you please check it to see whether it meets the expectation when you have time? |
|
||
The last URL. | ||
""" | ||
if not isinstance(schema, dict): |
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.
Will have a closer look, but the schema does not have to be a dict (it's an arbitrary collections.Mapping) and does not necessarily even need to be copy-able.
return | ||
|
||
for k in schema.keys(): | ||
if k in [u"id", u"$id"] and isinstance(schema[k], str): |
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.
This should use Validator.ID_OF
in some way.
@@ -862,6 +864,40 @@ def resolve_remote(self, uri): | |||
self.store[uri] = result | |||
return result | |||
|
|||
def store_subschema(self, schema, last_url=None): |
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.
To start I'd not want this to be a public method / addition to the API.
Awesome! Left 3 quick comments from a first read on the approach. Will have a closer read but let me know if any of those seem unclear. |
@willson-chen I think this function is useful. Could you please modify it based on the review comments? |
No description provided.