-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Feature] Allow json-loads-able strings to be passed as schema #1028
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #1028 +/- ##
==========================================
- Coverage 65.53% 64.18% -1.35%
==========================================
Files 63 63
Lines 4842 4844 +2
==========================================
- Hits 3173 3109 -64
- Misses 1669 1735 +66 ☔ View full report in Codecov by Sentry. |
d31faa8
to
67f0b4b
Compare
@Harsha-Nori @riedgar-ms ping :) |
@@ -937,7 +938,9 @@ def json( | |||
# Default schema is empty, "anything goes" schema | |||
# TODO: consider default being `{"type": "object"}` | |||
schema = {} | |||
elif isinstance(schema, (Mapping, bool)): | |||
elif isinstance(schema, (Mapping, bool, str)): | |||
if isinstance(schema, 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.
Test?
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.
@riedgar-ms done :)
No description provided.