pub fn extract_paths(attributes: &str) -> Vec<String>Expand description
Extract the file paths from the attributes Support the old syntax (MODULE_TREE_PATH => MODULE_SRC_PATH) ; (MODULE_TREE_PATH => MODULE_SRC_PATH) ; and the new syntax MODULE_SRC_PATH, MODULE_SRC_PATH
ยงExample
use utoipauto_core::string_utils::extract_paths;
let paths = extract_paths(
"(utoipa_auto_macro::tests::controllers::controller1 => ./utoipa-auto-macro/tests/controllers/controller1.rs) ; (utoipa_auto_macro::tests::controllers::controller2 => ./utoipa-auto-macro/tests/controllers/controller2.rs)"
);
assert_eq!(
paths,
vec![
"./utoipa-auto-macro/tests/controllers/controller1.rs".to_string(),
"./utoipa-auto-macro/tests/controllers/controller2.rs".to_string(),
]
);