all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pdm-devel] [PATCH proxmox 1/2] pve-api-types: generator lib: add method to get return schema of api
@ 2025-12-01 15:00 Dominik Csapak
  2025-12-01 15:00 ` [pdm-devel] [PATCH proxmox 2/2] fix #7080: pve-api-types: mark 'has-dbus-vmstate' optional Dominik Csapak
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Dominik Csapak @ 2025-12-01 15:00 UTC (permalink / raw)
  To: pdm-devel

this can be useful to manually modify some parts of the return schema

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 pve-api-types/generator-lib/Schema2Rust.pm | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/pve-api-types/generator-lib/Schema2Rust.pm b/pve-api-types/generator-lib/Schema2Rust.pm
index fe3c4ff1..208b0596 100644
--- a/pve-api-types/generator-lib/Schema2Rust.pm
+++ b/pve-api-types/generator-lib/Schema2Rust.pm
@@ -1881,6 +1881,14 @@ sub api : prototype($$$;%) {
     create_method($api_url, $method, $rust_method_name, %extra);
 }
 
+# Get the return schema of a method to manipulate it.
+sub get_return_type : prototype($$) {
+    my ($method, $api_url) = @_;
+
+    (undef, $method) = walk_api($method, $api_url);
+    return $method->{returns};
+}
+
 # Fills $ALL_PATHS recursively from an api node.
 my sub collect_paths : prototype($$);
 sub collect_paths : prototype($$) {
-- 
2.47.3



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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-12-01 23:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-01 15:00 [pdm-devel] [PATCH proxmox 1/2] pve-api-types: generator lib: add method to get return schema of api Dominik Csapak
2025-12-01 15:00 ` [pdm-devel] [PATCH proxmox 2/2] fix #7080: pve-api-types: mark 'has-dbus-vmstate' optional Dominik Csapak
2025-12-01 15:02 ` [pdm-devel] [PATCH proxmox 1/2] pve-api-types: generator lib: add method to get return schema of api Dominik Csapak
2025-12-01 23:10 ` [pdm-devel] applied: " Thomas Lamprecht

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