proxmox/proxmox-section-config
Wolfgang Bumiller 4a154b3cb5 section-config: support a type_key property
For when the underlying datatype is supposed to contain the type
property and the schema does not mark it as optional.

The use case here is to support flat `Remote` type where the "type" of
pve/pmg/pbs is a property which is present in the `Remote` struct
while being derived from the section type.

This will implicitly include and strip the type of the json object
after/before de/serializing.

Alternatives would be
- to mark the type as optional and just fill it out later when loading
  the data, but that is technically wrong...
- have a 2nd version of the struct with the type field removed and
  From/Into implemented, but that's even more unwieldy.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-08-06 14:14:42 +02:00
..
debian bump proxmox-section-config to 2.0.2-1 2024-05-17 11:04:10 +02:00
src section-config: support a type_key property 2024-08-06 14:14:42 +02:00
Cargo.toml bump proxmox-section-config to 2.0.2-1 2024-05-17 11:04:10 +02:00