Skip to content

Commit

Permalink
post rebase tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
archeoss committed Sep 10, 2023
1 parent d6e5fff commit 32b7540
Show file tree
Hide file tree
Showing 4 changed files with 340 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[alias]
backend="build --features backend --no-default-features"
frontend="run --bin frontend --features frontend --no-default-features"
backend="build --no-default-features"
frontend="run -p bob_management --bin frontend --features frontend --no-default-features"
swagger="run --features swagger -- --default"

# [build]
Expand Down
6 changes: 3 additions & 3 deletions backend/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#![allow(clippy::multiple_crate_versions)]

use axum::routing::get;
#[cfg(feature = "swagger")]
use axum::Router;
use axum::{routing::get, Router};
#[cfg(feature = "swagger")]
use utoipa::OpenApi;
pub mod connector;
Expand Down Expand Up @@ -43,7 +42,8 @@ pub fn openapi_doc() -> Router {
)]
struct ApiDoc;
/* Mount Swagger ui */
Router::new().merge(SwaggerUi::new("/swagger-ui").url("/api-docs/openapi.json", ApiDoc::openapi()))
Router::new()
.merge(SwaggerUi::new("/swagger-ui").url("/api-docs/openapi.json", ApiDoc::openapi()))
.merge(Redoc::with_url("/redoc", ApiDoc::openapi()))
// There is no need to create `RapiDoc::with_openapi` because the OpenApi is served
// via SwaggerUi instead we only make rapidoc to point to the existing doc.
Expand Down
2 changes: 1 addition & 1 deletion backend/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use axum::{routing::get, Router};
use backend::{prelude::*, root, services::api_router};
use cli::Parser;
use error_stack::Report;
use std::path::PathBuf;
use std::{env, path::PathBuf};
use tower::ServiceBuilder;
use tower_http::{cors::CorsLayer, services::ServeDir};
use tracing::Level;
Expand Down
Loading

0 comments on commit 32b7540

Please sign in to comment.