move API docs to different route than API endpoints

This commit is contained in:
Neshura 2023-12-13 19:06:46 +01:00
parent 5c0c03fd7a
commit 22fa59334c
Signed by: Neshura
GPG key ID: B6983AAA6B9A7A6C

View file

@ -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(),
),
])