[pdm-devel] superseded: [PATCH proxmox] pve-api-types: schema2rust: handle `macro` keyword like we do `type`
Hannes Laimer
h.laimer at proxmox.com
Thu Oct 23 16:20:43 CEST 2025
superseded-by:
https://lore.proxmox.com/pdm-devel/20251023141956.106640-1-h.laimer@proxmox.com/T/#u
On 10/23/25 10:18, Hannes Laimer wrote:
> 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;
> }
More information about the pdm-devel
mailing list