diff --git a/crates/bevy_remote/src/schemas/json_schema.rs b/crates/bevy_remote/src/schemas/json_schema.rs index e98fd21abd..8657d4e8d4 100644 --- a/crates/bevy_remote/src/schemas/json_schema.rs +++ b/crates/bevy_remote/src/schemas/json_schema.rs @@ -649,7 +649,7 @@ mod tests { let schema = export_type::(); let schema_as_value = serde_json::to_value(&schema).expect("Failed to serialize schema"); - let value = json!({ + let mut value = json!({ "shortPath": "Foo", "$schema": "https://json-schema.org/draft/2020-12/schema", "typePath": "bevy_remote::schemas::json_schema::tests::Foo", @@ -671,7 +671,6 @@ mod tests { "maximum": 65535, "minimum": 0, "type": "integer", - "description": "Test doc", "shortPath": "u16", "typePath": "u16", }, @@ -680,6 +679,9 @@ mod tests { "a" ] }); + if cfg!(feature = "documentation") { + value["properties"]["a"]["description"] = json!("Test doc"); + } assert_normalized_values(schema_as_value, value); } diff --git a/crates/bevy_remote/src/schemas/reflect_info.rs b/crates/bevy_remote/src/schemas/reflect_info.rs index 8e2e8e675a..148f9e7fda 100644 --- a/crates/bevy_remote/src/schemas/reflect_info.rs +++ b/crates/bevy_remote/src/schemas/reflect_info.rs @@ -627,7 +627,7 @@ pub trait SchemaInfoReflect { None } - /// Get the underlaying TypeId + /// Get the underlying TypeId fn get_type(&self) -> TypeId; /// Try to get the attribute by id @@ -960,7 +960,7 @@ mod tests { fn reflect_struct_with_array() { #[derive(Reflect, Default, Deserialize, Serialize)] pub struct ArrayComponent { - pub arry: [i32; 3], + pub array: [i32; 3], } eprintln!( "{}",