def schema(request_body_schema, min_version=None, max_version=None):
 def add_validator(func):
  @functools.wraps(func)
  def wrapper(*args, **kwargs):
   _schema_validation_helper(request_body_schema, kwargs['body'], min_version, max_version, args, kwargs)
   return func(*args, **kwargs)
  return wrapper
 return add_validator

def schema ( request_body_schema , min_version = None , max_version = None ) : def add_validator ( func ) : @ functools . wraps ( func ) def wrapper ( * args , ** kwargs ) : _schema_validation_helper ( request_body_schema , kwargs [ 'body' ] , min_version , max_version , args , kwargs ) return func ( * args , ** kwargs ) return wrapper return add_validator
register a schema to validate request body .