remove redoc and further swagger configuration
This commit is contained in:
parent
684eba8c70
commit
e3f954679a
3 changed files with 4 additions and 19 deletions
13
Cargo.lock
generated
13
Cargo.lock
generated
|
|
@ -61,7 +61,6 @@ dependencies = [
|
|||
"tokio",
|
||||
"utoipa",
|
||||
"utoipa-axum",
|
||||
"utoipa-redoc",
|
||||
"utoipa-swagger-ui",
|
||||
]
|
||||
|
||||
|
|
@ -3590,18 +3589,6 @@ dependencies = [
|
|||
"syn 2.0.104",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "utoipa-redoc"
|
||||
version = "6.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6427547f6db7ec006cbbef95f7565952a16f362e298b416d2d497d9706fef72d"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"utoipa",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "utoipa-swagger-ui"
|
||||
version = "9.0.2"
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ tokio = { version = "1.46.1", features = [ "full" ] }
|
|||
utoipa = "5.4.0"
|
||||
utoipa-axum = "0.2.0"
|
||||
utoipa-swagger-ui = { version = "9", features = ["axum", "reqwest"] }
|
||||
utoipa-redoc = { version = "6", features = ["axum"] }
|
||||
futures-util = "0.3.31"
|
||||
log = "0.4.27"
|
||||
pretty_env_logger = "0.5.0"
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ use sea_orm::{ConnectionTrait, Database, DatabaseConnection, EntityTrait, Pagina
|
|||
use tokio::{sync::broadcast::{self, Sender}};
|
||||
use utoipa::{openapi::{security::{HttpAuthScheme, HttpBuilder, SecurityScheme}, ContactBuilder, InfoBuilder, LicenseBuilder}, Modify, OpenApi};
|
||||
use utoipa_axum::router::OpenApiRouter;
|
||||
use utoipa_redoc::{Redoc, Servable};
|
||||
use utoipa_swagger_ui::{Config, SwaggerUi};
|
||||
use utoipa_axum::routes;
|
||||
|
||||
|
|
@ -196,14 +195,14 @@ async fn run_server(db: Arc<DatabaseConnection>) {
|
|||
|
||||
api.merge(ApiDoc::openapi());
|
||||
|
||||
let redoc = Redoc::with_url("/docs/", api.clone());
|
||||
let swagger = SwaggerUi::new("/docs2/")
|
||||
.url("/docs2/openapi.json", api)
|
||||
let swagger = SwaggerUi::new("/docs/")
|
||||
.url("/docs/openapi.json", api)
|
||||
.config(Config::default()
|
||||
.try_it_out_enabled(true)
|
||||
.filter(true)
|
||||
.display_request_duration(true)
|
||||
);
|
||||
|
||||
let router = router.merge(redoc);
|
||||
let router = router.merge(swagger);
|
||||
|
||||
let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await.unwrap();
|
||||
|
|
|
|||
Reference in a new issue