From daf03b5b3ac9c874a3960bee18d8849783f76377 Mon Sep 17 00:00:00 2001 From: Piotr Siuszko Date: Sat, 5 Jul 2025 09:46:01 +0200 Subject: [PATCH] Restore a as a f32 field, add separate unsigned field in test struct --- crates/bevy_remote/src/schemas/json_schema.rs | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/crates/bevy_remote/src/schemas/json_schema.rs b/crates/bevy_remote/src/schemas/json_schema.rs index 8369d96c6b..6a2c83d39e 100644 --- a/crates/bevy_remote/src/schemas/json_schema.rs +++ b/crates/bevy_remote/src/schemas/json_schema.rs @@ -719,7 +719,8 @@ mod tests { #[reflect(Resource, Default)] struct Foo { /// Test doc - a: u16, + a: f32, + b: u8, } let schema = export_type::(); @@ -735,22 +736,29 @@ mod tests { "Default", ], "default": { - "a": 0 + "a": 0.0, + "b": 0 }, "kind": "Struct", "type": "object", "additionalProperties": false, "properties": { "a": { - "maximum": 65535, + "type": "number", + "kind": "Value", + "typePath": "f32" + }, + "b": { "minimum": 0, + "maximum": 255, "type": "integer", "kind": "Value", - "typePath": "u16" - }, + "typePath": "u8" + } }, "required": [ - "a" + "a", + "b" ] }); if cfg!(feature = "documentation") {