api-macro: re-order ObjectSchema fields to be sorted

this panics when running `cargo test` otherwise, as the api macro
requires fields in `ObjectSchema`s to be sorted now.

Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
This commit is contained in:
Shannon Sterz 2025-03-06 13:43:48 +01:00 committed by Wolfgang Bumiller
parent f0b23def30
commit ccb34b33e2

View File

@ -183,12 +183,7 @@ fn router_do(item: TokenStream) -> Result<TokenStream, Error> {
&::proxmox_schema::ObjectSchema::new(
"An example of a struct with renamed fields.",
&[
(
"test-string",
false,
&::proxmox_schema::StringSchema::new("A test string.").schema(),
),
(
(
"SomeOther",
true,
&::proxmox_schema::StringSchema::new(
@ -196,6 +191,12 @@ fn router_do(item: TokenStream) -> Result<TokenStream, Error> {
)
.schema(),
),
(
"test-string",
false,
&::proxmox_schema::StringSchema::new("A test string.").schema(),
),
],
)
.schema();