Last active
December 23, 2015 22:09
-
-
Save oxtopus/6701439 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import validictory | |
import yaml | |
data = yaml.load(""" | |
- foo | |
- bar: [baz, null, 1.0, 2] | |
""") | |
with open('schema.yml', 'r') as inp: | |
schema = yaml.load(inp.read()) | |
validictory.validate(data,schema) |
This file contains hidden or 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
items: | |
- type: string | |
- properties: | |
bar: | |
items: | |
- type: string | |
- type: any | |
- type: number | |
- type: integer | |
type: object | |
type: array |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment