by factorialboy · 6y ago · 0 comments
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)