From 22fa59334cc41ff145e39e98781512d76e517329 Mon Sep 17 00:00:00 2001 From: Neshura Date: Wed, 13 Dec 2023 19:06:46 +0100 Subject: [PATCH] move API docs to different route than API endpoints --- src/main.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main.rs b/src/main.rs index 5f59b99..6a3a574 100644 --- a/src/main.rs +++ b/src/main.rs @@ -221,9 +221,9 @@ async fn main() { struct ApiDocV1; let openapi_urls = vec![ - Url::new("v1", concat!(api_base_1!(), "/openapi.json")), - Url::new("v2-L", concat!(api_base_2!(), "/openapi.json")), - Url::new("v3-L", concat!(api_base_3!(), "/openapi.json")), + Url::new("v1", concat!(api_base!(), "-docs/openapi1.json")), + Url::new("v2-L", concat!(api_base!(), "-docs/openapi2l.json")), + Url::new("v3-L", concat!(api_base!(), "-docs/openapi3l.json")), ]; loop { @@ -299,15 +299,15 @@ async fn main() { SwaggerUi::new(concat!(api_base!(), "/swagger/{_:.*}")) .urls(vec![ ( - Url::new("v1", concat!(api_base_1!(), "/openapi.json")), + Url::new("v1", concat!(api_base!(), "-docs/openapi1.json")), openapi_v1.clone(), ), ( - Url::new("v2-l", concat!(api_base_2!(), "/openapi.json")), + Url::new("v2-l", concat!(api_base!(), "-docs/openapi2l.json")), openapi_v2_l.clone(), ), ( - Url::new("v3-l", concat!(api_base_3!(), "/openapi.json")), + Url::new("v3-l", concat!(api_base!(), "-docs/openapi3l.json")), openapi_v3_l.clone(), ), ])