[pdm-devel] [PATCH proxmox] pve-api-types: schema2rust: handle `macro` keyword like we do `type`
Hannes Laimer
h.laimer at proxmox.com
Thu Oct 23 10:17:47 CEST 2025
Firewall rules have a field named `macro`, this would trip up the
generated rust code. This fixes that.
Signed-off-by: Hannes Laimer <h.laimer at proxmox.com>
---
Technically this did not happen yet, but it will. Once we use firewall
rule endpoints
pve-api-types/generator-lib/Schema2Rust.pm | 1 +
1 file changed, 1 insertion(+)
diff --git a/pve-api-types/generator-lib/Schema2Rust.pm b/pve-api-types/generator-lib/Schema2Rust.pm
index c5ac4aad..5c98d3be 100644
--- a/pve-api-types/generator-lib/Schema2Rust.pm
+++ b/pve-api-types/generator-lib/Schema2Rust.pm
@@ -713,6 +713,7 @@ sub namify_field : prototype($) {
}
return 'ty' if $out eq 'type';
+ return 'r#macro' if $out eq 'macro';
return $out;
}
--
2.47.3
More information about the pdm-devel
mailing list