move API docs to different route than API endpoints
This commit is contained in:
parent
5c0c03fd7a
commit
22fa59334c
1 changed files with 6 additions and 6 deletions
12
src/main.rs
12
src/main.rs
|
@ -221,9 +221,9 @@ async fn main() {
|
||||||
struct ApiDocV1;
|
struct ApiDocV1;
|
||||||
|
|
||||||
let openapi_urls = vec![
|
let openapi_urls = vec![
|
||||||
Url::new("v1", concat!(api_base_1!(), "/openapi.json")),
|
Url::new("v1", concat!(api_base!(), "-docs/openapi1.json")),
|
||||||
Url::new("v2-L", concat!(api_base_2!(), "/openapi.json")),
|
Url::new("v2-L", concat!(api_base!(), "-docs/openapi2l.json")),
|
||||||
Url::new("v3-L", concat!(api_base_3!(), "/openapi.json")),
|
Url::new("v3-L", concat!(api_base!(), "-docs/openapi3l.json")),
|
||||||
];
|
];
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
|
@ -299,15 +299,15 @@ async fn main() {
|
||||||
SwaggerUi::new(concat!(api_base!(), "/swagger/{_:.*}"))
|
SwaggerUi::new(concat!(api_base!(), "/swagger/{_:.*}"))
|
||||||
.urls(vec![
|
.urls(vec![
|
||||||
(
|
(
|
||||||
Url::new("v1", concat!(api_base_1!(), "/openapi.json")),
|
Url::new("v1", concat!(api_base!(), "-docs/openapi1.json")),
|
||||||
openapi_v1.clone(),
|
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(),
|
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(),
|
openapi_v3_l.clone(),
|
||||||
),
|
),
|
||||||
])
|
])
|
||||||
|
|
Reference in a new issue