diff --git a/proxmox-rest-server/src/api_config.rs b/proxmox-rest-server/src/api_config.rs index 382b8a48..ad9a8111 100644 --- a/proxmox-rest-server/src/api_config.rs +++ b/proxmox-rest-server/src/api_config.rs @@ -146,6 +146,18 @@ impl ApiConfig { self } + /// Register multiple path aliases. See `[ApiConfig::alias()]`. + pub fn aliases(mut self, aliases: I) -> Self + where + I: IntoIterator, + S: Into, + P: Into, + { + self.aliases + .extend(aliases.into_iter().map(|(s, p)| (s.into(), p.into()))); + self + } + pub(crate) fn env_type(&self) -> RpcEnvironmentType { self.env_type }