def load_schema ( schema_path ) : with open ( schema_path , 'r' ) as schema_file : schema = simplejson . load ( schema_file ) resolver = RefResolver ( '' , '' , schema . get ( 'models' , { } ) ) return build_request_to_validator_map ( schema , resolver )
jsonschema python multiple schema files
Prepare the api specification for request and response validation .
def load_schema(schema_path):
    """Prepare the api specification for request and response validation.

    :returns: a mapping from :class:`RequestMatcher` to :class:`ValidatorMap`
        for every operation in the api specification.
    :rtype: dict
    """
    with open(schema_path, 'r') as schema_file:
        schema = simplejson.load(schema_file)
    resolver = RefResolver('', '', schema.get('models', {}))
    return build_request_to_validator_map(schema, resolver)