def query_schema(query_params_schema, min_version=None, max_version=None):
 def add_validator(func):
  @functools.wraps(func)
  def wrapper(*args, **kwargs):
   if ('req' in kwargs):
    req = kwargs['req']
   else:
    req = args[1]
   if _schema_validation_helper(query_params_schema, req.GET.dict_of_lists(), min_version, max_version, args, kwargs, is_body=False):
    _strip_additional_query_parameters(query_params_schema, req)
   return func(*args, **kwargs)
  return wrapper
 return add_validator

def query_schema ( query_params_schema , min_version = None , max_version = None ) : def add_validator ( func ) : @ functools . wraps ( func ) def wrapper ( * args , ** kwargs ) : if ( 'req' in kwargs ) : req = kwargs [ 'req' ] else : req = args [ 1 ] if _schema_validation_helper ( query_params_schema , req . GET . dict_of_lists ( ) , min_version , max_version , args , kwargs , is_body = False ) : _strip_additional_query_parameters ( query_params_schema , req ) return func ( * args , ** kwargs ) return wrapper return add_validator
register a schema to validate request query parameters .