2 ms·
There's some nice python packages to natively use it. https://pypi.org/project/jsonschema/ https://pypi.org/project/jsonschema/ We use it at Uclusion to make s
by bfuclusion 6y ago
There's some nice python packages to natively use it.
https://pypi.org/project/jsonschema/ https://pypi.org/project/jsonschema/
We use it at Uclusion to make sure our front end is passing the right arguments, by having it be the first thing our lambdas do with the request body:
from jsonschema import validate as validate_schema
def validate_syntax(self, event):
"""
Subclasses are expected to override this to handle any syntactical validation different from here
:param event: the request event object
:return:
"""
schema = self.get_schema() # implemented by individual validator objects
validate_schema(event, schema)