Last active
April 26, 2019 13:39
-
-
Save erickpeirson/e0ce63f5142eba5e1d486bafaace52c4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"$id": "http://foo.qwerty/some/schema#", | |
"title": "Foo Schema", | |
"type": "object", | |
"properties": { | |
"title": { | |
"type": "string" | |
}, | |
"awesome": { | |
"type": "number" | |
} | |
}, | |
"required": ["title"] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from jsonschema_typed.types import JSONSchema | |
data: JSONSchema['path/to/schema.json'] = dict(title='baz') | |
data['description'] = 'there is no description' # TypedDict "FooSchema" has no key 'description' | |
data['awesome'] = 42 | |
data['awesome'] = None # Argument 2 has incompatible type "None"; expected "Union[int, float]" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment