def METHOD_NAME(schema_dir=None):
    """
    Create full path regexes for all BIDS specification files.
    Parameters
    ----------
    schema_dir : str, optional
        A string pointing to a BIDS directory for which paths should be validated.
    Returns
    -------
    all_regex : list of dict
        A list of dictionaries, with keys including 'regex' and 'mandatory'.
    my_schema : Mapping
        Nested dictionaries representing the full schema.
    """
    schema = bst.schema.load_schema(schema_dir)
    all_regex = []
    for group in (schema.rules.files.common, schema.rules.files.raw):
        all_regex.extend(regexify_filename_rules(group, schema, level=2))
    return all_regex, schema