Test without documentation fix, typo fixes

This commit is contained in:
Piotr Siuszko 2025-06-23 18:02:32 +02:00
parent 16278cb4a3
commit ef2ff40d75
2 changed files with 6 additions and 4 deletions

View File

@ -649,7 +649,7 @@ mod tests {
let schema = export_type::<Foo>();
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);
}

View File

@ -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!(
"{}",