all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Hannes Laimer <h.laimer@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH proxmox] pve-api-types: schema2rust: handle `macro` keyword like we do `type`
Date: Thu, 23 Oct 2025 10:17:47 +0200	[thread overview]
Message-ID: <20251023081747.24125-1-h.laimer@proxmox.com> (raw)

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@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



_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel


             reply	other threads:[~2025-10-23  8:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-23  8:17 Hannes Laimer [this message]
2025-10-23 14:20 ` [pdm-devel] superseded: " Hannes Laimer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251023081747.24125-1-h.laimer@proxmox.com \
    --to=h.laimer@proxmox.com \
    --cc=pdm-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal