fix(server): schemars compilation errors (#104)

This commit is contained in:
Sandipsinh Dilipsinh Rathod 2025-04-07 21:41:55 -04:00 committed by GitHub
parent b9be9797d1
commit 938ecbe2fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -14,7 +14,7 @@ use crate::{
};
/// A shortcut for generating a JSON schema for a type.
pub fn schema_for_type<T: JsonSchema>() -> JsonObject {
let schema = schemars::SchemaGenerator::default().into_root_schema_for::<T>();
let schema = schemars::r#gen::SchemaGenerator::default().into_root_schema_for::<T>();
let object = serde_json::to_value(schema).expect("failed to serialize schema");
match object {
serde_json::Value::Object(object) => object,