Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
archeoss committed Jan 14, 2024
1 parent 6a1fef7 commit 05367a0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 4 additions & 2 deletions backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ cli = { path = "../cli" }
# Macro
proc-macro = { path = "../proc_macro" }

[dev-dependencies]
utoipa = { version = "4.0", features = ["yaml", "axum_extras", "chrono", "openapi_extensions"]}

[features]
# default = [ "swagger" ]
default = [ ]
default = [ "swagger" ]
swagger = [ "dep:utoipa", "dep:utoipa-swagger-ui" , "dep:utoipa-redoc", "dep:utoipa-rapidoc" ]
gen_api = [ "dep:utoipa" ]

7 changes: 5 additions & 2 deletions backend/src/models/shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,12 @@ impl ToString for Hostname {

/// Data needed to connect to a BOB cluster
#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
#[cfg_attr(
all(feature = "swagger", debug_assertions),
derive(IntoParams, ToSchema)
)]
#[cfg_attr(all(feature = "swagger", debug_assertions),
schema(example = json!({"hostname": "0.0.0.0:7000", "credentials": {"login": "archeoss", "password": "12345"}})))]
#[cfg_attr(all(feature = "swagger", debug_assertions), derive(IntoParams, ToSchema))]
pub struct BobConnectionData {
/// Address to connect to
pub hostname: Hostname,
Expand All @@ -79,8 +82,8 @@ pub struct BobConnectionData {

/// Optional auth credentials for a BOB cluster
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Default, Serialize, Deserialize)]
#[cfg_attr(all(feature = "swagger", debug_assertions), schema(example = json!({"login": "archeoss", "password": "12345"})))]
#[cfg_attr(all(feature = "swagger", debug_assertions), derive(ToSchema))]
#[cfg_attr(all(feature = "swagger", debug_assertions), schema(example = json!({"login": "archeoss", "password": "12345"})))]
pub struct Credentials {
/// Login used during auth
pub login: String,
Expand Down

0 comments on commit 05367a0

Please sign in to comment.