in api_generator/src/generator/mod.rs [287:314]
fn replace_version_in_url(s: String) -> String {
match url::Url::parse(&s) {
Ok(u) => {
let mut u = u;
if u.path().contains("/master") {
u.set_path(
u.path()
.replace(
"/master",
format!("/{}.{}", VERSION.major, VERSION.minor).as_str(),
)
.as_str(),
);
} else if u.path().contains("/current") {
u.set_path(
u.path()
.replace(
"/current",
format!("/{}.{}", VERSION.major, VERSION.minor).as_str(),
)
.as_str(),
);
}
u.into()
}
Err(_) => s,
}
}