diff --git a/utoipa-swagger-ui/src/axum.rs b/utoipa-swagger-ui/src/axum.rs index c99e2e95..0fbe5a56 100644 --- a/utoipa-swagger-ui/src/axum.rs +++ b/utoipa-swagger-ui/src/axum.rs @@ -34,7 +34,11 @@ where ); let config = if let Some(config) = swagger_ui.config { - config.configure_defaults(urls) + if config.url.is_some() || !config.urls.is_empty() { + config + } else { + config.configure_defaults(urls) + } } else { Config::new(urls) };