def build_request_to_validator_map(schema, resolver):
    """Build a mapping from :class:`RequestMatcher` to :class:`ValidatorMap`
    for each operation in the API spec. This mapping may be used to retrieve
    the appropriate validators for a request.
    """
    schema_models = schema.get('models', {})
    return dict(
        (
            RequestMatcher(api['path'], operation['method']),
            ValidatorMap.from_operation(operation, schema_models, resolver)
        )
        for api in schema['apis']
        for operation in api['operations']
    )