fix(interface): preserve operation item uniqueness

Disambiguate generated argument types when distinct operation names normalize to the same PascalCase form, and add the requested Number round-trip and collision regression coverage.
This commit is contained in:
2026-09-28 23:21:13 +09:00
parent 18ac8844b0
commit 3f94d48f04
3 changed files with 79 additions and 0 deletions
+11
View File
@@ -67,6 +67,17 @@ fn supported_values_round_trip() {
assert!(fields.iter().all(|field| field.name != "priority"));
assert_eq!(Request::decode(encoded).unwrap(), request);
let number = 42.5_f64;
assert_eq!(f64::type_expr(), TypeExpr::Number);
assert_eq!(f64::decode(number.encode().unwrap()).unwrap(), number);
let narrow_number = 1.5_f32;
assert_eq!(f32::type_expr(), TypeExpr::Number);
assert_eq!(
f32::decode(narrow_number.encode().unwrap()).unwrap(),
narrow_number
);
for color in [Color::Red, Color::Blue] {
let encoded = color.clone().encode().unwrap();
let decoded = Color::decode(encoded).unwrap();