fix(server): schemars compilation errors (#104)
This commit is contained in:
parent
b9be9797d1
commit
938ecbe2fb
1 changed files with 1 additions and 1 deletions
|
|
@ -14,7 +14,7 @@ use crate::{
|
||||||
};
|
};
|
||||||
/// A shortcut for generating a JSON schema for a type.
|
/// A shortcut for generating a JSON schema for a type.
|
||||||
pub fn schema_for_type<T: JsonSchema>() -> JsonObject {
|
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");
|
let object = serde_json::to_value(schema).expect("failed to serialize schema");
|
||||||
match object {
|
match object {
|
||||||
serde_json::Value::Object(object) => object,
|
serde_json::Value::Object(object) => object,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue