Wolfgang Bumiller
72c95c35bb
schema: make schema types #[non_exhaustive]
...
This way extending them is not a breaking change anymore.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-15 10:56:58 +01:00
Wolfgang Bumiller
dc232f8bd4
schema: support PVE's "keyAlias" legacy property strings
...
Because the UI kept producing them...
And still does...
This is NOT meant to be used by anything other than generated legacy
code for PDM (pve-api-types) and only affects the serde based
deserializer. The "old" `schema.parse_property_string() -> Value`
method does not utilize this for now.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-15 10:56:58 +01:00
Maximiliano Sandoval
c8b975799b
fix typos in strings
...
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
2024-07-22 08:49:42 +02:00
Wolfgang Bumiller
49b2bdf9c6
schema: drop periods after errors
...
lower case start + period = wrong
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-02-21 12:05:44 +01:00
Wolfgang Bumiller
9c40144214
schema: add regression tests for additional_properties in AllOf
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-02-21 12:02:00 +01:00
Wolfgang Bumiller
f6e089555e
schema: verify property strings w/ new serde code
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-07-13 16:19:19 +02:00
Wolfgang Bumiller
1e0c04a4ba
drop param_bail test
...
it's not actually testing anything useful
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-03-04 09:44:51 +01:00
Dominik Csapak
7c7e99dca1
proxmox-schema: add convenience macros for ParameterError
...
with two variants:
(expr, expr) => assumes that the second is an 'Error'
(expr, (tt)+) => passes the tt through anyhow::format_err
also added tests
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-03-04 09:43:01 +01:00
Wolfgang Bumiller
8a60e6c8d0
schema: rustfmt
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-11 14:05:05 +01:00
Wolfgang Bumiller
2d9fbc02ab
schema: fix deprecation warnings in tests
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-12-17 08:07:02 +01:00
Wolfgang Bumiller
5f75b37301
schema: formatting
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-12-07 11:53:18 +01:00
Wolfgang Bumiller
41f3fdfeb9
add proxmox-schema and proxmox-router crates
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-11 11:39:59 +02:00