def __init__(self,
                 module: types.ModuleType,
                 *,
                 response_factory: Callable[..., Any] = None,
                 error_class: Any = None,
                 validator_class: Any = DefaultValidator,
                 validation_error_class: Type[Exception] = ValidationError,
                 validate_func: ValidateFunc = None) -> None:
        """Initialize Schema object.

        :param module: Module contains at least request and response schemas.
        :param response_factory: Put valid response data to this factory func.
        :param error_class:
            Wrap all errors in given class. If empty real errors would be
            reraised.
        :param validator_class:
            Validator class to use for validating request and response data.
            By default: ``rororo.schemas.validators.DefaultValidator``
        :param validation_error_class:
            Error class to be expected in case of validation error. By default:
            ``jsonschema.exceptions.ValidationError``
        :param validate_func:
            Validate function to be called for validating request and response
            data. Function will receive 2 args: ``schema`` and ``pure_data``.
            By default: ``None``
        """
        self._valid_request = None  # type: Optional[bool]

        self.module = module
        self.response_factory = response_factory
        self.error_class = error_class

        self.validator_class = validator_class
        self.validate_func = (
            validate_func or
            validate_func_factory(validator_class))
        self.validation_error_class = validation_error_class
def __init__ ( self , module : types . ModuleType , * , response_factory : Callable [ ... , Any ] = None , error_class : Any = None , validator_class : Any = DefaultValidator , validation_error_class : Type [ Exception ] = ValidationError , validate_func : ValidateFunc = None ) -> None : self . _valid_request = None self . module = module self . response_factory = response_factory self . error_class = error_class self . validator_class = validator_class self . validate_func = ( validate_func or validate_func_factory ( validator_class ) ) self . validation_error_class = validation_error_class
Initialize Schema object.

        :param module: Module contains at least request and response schemas.
        :param response_factory: Put valid response data to this factory func.
        :param error_class:
            Wrap all errors in given class. If empty real errors would be
            reraised.
        :param validator_class:
            Validator class to use for validating request and response data.
            By default: ``rororo.schemas.validators.DefaultValidator``
        :param validation_error_class:
            Error class to be expected in case of validation error. By default:
            ``jsonschema.exceptions.ValidationError``
        :param validate_func:
            Validate function to be called for validating request and response
            data. Function will receive 2 args: ``schema`` and ``pure_data``.
            By default: ``None``