From 6a4c997070fb510e8bd42a94d389625acb667a0b Mon Sep 17 00:00:00 2001 From: Yang Jing Date: Thu, 29 Aug 2024 10:33:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20utoipa=20=E4=BD=BF=E7=94=A8=20schema::Ty?= =?UTF-8?q?pe?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/ultimate-db/Cargo.toml | 3 +++ crates/ultimate-db/src/modql_utils.rs | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/crates/ultimate-db/Cargo.toml b/crates/ultimate-db/Cargo.toml index 0d42456..0df063b 100644 --- a/crates/ultimate-db/Cargo.toml +++ b/crates/ultimate-db/Cargo.toml @@ -10,6 +10,9 @@ repository.workspace = true [lints] workspace = true +[features] +# default = ["utoipa"] + [dependencies] ultimate-common.workspace = true ultimate.workspace = true diff --git a/crates/ultimate-db/src/modql_utils.rs b/crates/ultimate-db/src/modql_utils.rs index f0d07ca..8e6fbbd 100644 --- a/crates/ultimate-db/src/modql_utils.rs +++ b/crates/ultimate-db/src/modql_utils.rs @@ -30,7 +30,7 @@ pub fn to_sea_chrono_offset(v: serde_json::Value) -> SeaResult #[cfg(feature = "utoipa")] pub fn op_vals_integer_schema() -> utoipa::openapi::Object { utoipa::openapi::ObjectBuilder::new() - .schema_type(utoipa::openapi::SchemaType::Object) + .schema_type(utoipa::openapi::Type::Object) .description(Some("opvalfloat64")) .build() } @@ -38,7 +38,7 @@ pub fn op_vals_integer_schema() -> utoipa::openapi::Object { #[cfg(feature = "utoipa")] pub fn op_vals_string_schema() -> utoipa::openapi::Object { utoipa::openapi::ObjectBuilder::new() - .schema_type(utoipa::openapi::SchemaType::String) + .schema_type(utoipa::openapi::schema::Type::String) .description(Some("https://github.com/jeremychone/rust-modql?tab=readme-ov-file#opvalstring-operators")) .build() } @@ -46,7 +46,7 @@ pub fn op_vals_string_schema() -> utoipa::openapi::Object { #[cfg(feature = "utoipa")] pub fn op_vals_bool_schema() -> utoipa::openapi::Object { utoipa::openapi::ObjectBuilder::new() - .schema_type(utoipa::openapi::SchemaType::Boolean) + .schema_type(utoipa::openapi::schema::Type::Boolean) .description(Some("https://github.com/jeremychone/rust-modql?tab=readme-ov-file#opvalbool-operators")) .build() }