Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
validate(vlan_bad, schema)
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/jsonschema/", line 541, in validate
cls(schema, *args, **kwargs).validate(instance)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/jsonschema/", line 130, in validate
raise error
jsonschema.exceptions.ValidationError: 5000 is greater than the maximum of 4094
Failed validating 'maximum' in schema['properties']['vlan_id']:
{'description': 'The unique ID of the VLAN. IEEE 802.1Q VLAN '
'identifier (VID)',
'maximum': 4094,
'minimum': 1,
'sql.not_null': True,
'type': 'integer'}
On instance['vlan_id']:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment