From: Shannon Sterz <s.sterz@proxmox.com>
To: yew-devel@lists.proxmox.com
Subject: [yew-devel] [PATCH yew-comp 1/2] common api types: make BasicRealmInfo compatible with proxmox ve
Date: Tue, 25 Nov 2025 12:10:56 +0100 [thread overview]
Message-ID: <20251125111058.124109-2-s.sterz@proxmox.com> (raw)
In-Reply-To: <20251125111058.124109-1-s.sterz@proxmox.com>
the perl return types for booleans are integers so need special
handling when deserializing. otherwise, the realm selector will just
remain empty.
Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
---
src/common_api_types.rs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/common_api_types.rs b/src/common_api_types.rs
index a9d3c2a..be5c64e 100644
--- a/src/common_api_types.rs
+++ b/src/common_api_types.rs
@@ -15,7 +15,8 @@ pub struct BasicRealmInfo {
#[serde(rename = "type")]
pub ty: String,
/// True if it is the default realm
- #[serde(skip_serializing_if = "Option::is_none")]
+ #[serde(deserialize_with = "proxmox_serde::perl::deserialize_bool")]
+ #[serde(default, skip_serializing_if = "Option::is_none")]
pub default: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub comment: Option<String>,
--
2.47.3
_______________________________________________
yew-devel mailing list
yew-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/yew-devel
next prev parent reply other threads:[~2025-11-25 11:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-25 11:10 [yew-devel] [PATCH yew-comp 0/2] fix default realm loading for " Shannon Sterz
2025-11-25 11:10 ` Shannon Sterz [this message]
2025-11-25 11:10 ` [yew-devel] [PATCH yew-comp 2/2] realm selector: log load errors Shannon Sterz
2025-11-25 12:06 ` [yew-devel] applied: [PATCH yew-comp 0/2] fix default realm loading for proxmox ve Dietmar Maurer
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=20251125111058.124109-2-s.sterz@proxmox.com \
--to=s.sterz@proxmox.com \
--cc=yew-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox