[pbs-devel] applied: [PATCH proxmox-backup] api: serde-rename deleteable properties to kebab-case

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Jan 20 08:48:23 CET 2023


Am 19/01/2023 um 16:52 schrieb Lukas Wagner:
> In former commit, the enum members were renamed to be CamelCase, in
> accordance with the usual Rust style guide. However, this broke the
> GUI in some places due to failing JSON property deserialization.
> To fix this, some serde(rename = "kebab-case") directives were added.
> 
> Some properties were also serde-renamed to snake_case, otherwise
> it would have been necessary to also modify proxmox-widget-toolkit
> as well as PVE source code. This can follow in a later commit if so
> desired.
> 
> Fixes: a2055c38 fix non-camel-case enums
> Signed-off-by: Lukas Wagner <l.wagner at proxmox.com>
> ---
>  src/api2/config/media_pool.rs | 1 +
>  src/api2/config/remote.rs     | 1 +
>  src/api2/node/dns.rs          | 1 +
>  src/api2/node/network.rs      | 5 ++++-
>  4 files changed, 7 insertions(+), 1 deletion(-)
> 
>

applied, thanks!

Wonder if we could have some sane checks for catching that; e.g., a rust test that
reads a in-git saved schema and diffs it with the current one, with noting/warning
newly added properties and throwing an error if existing ones change, so that the
dev needs to record such changes explicitly with the patch they're modifying it, if
it's a wanted change that is.





More information about the pbs-devel mailing list