Wolfgang Bumiller
ef54afe65f
api-macro: bump to 1.3.2-1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-02-19 12:55:38 +01:00
Wolfgang Bumiller
a36f0f3bf9
api-macro: enums: sort OneOf variants
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-02-19 12:53:46 +01:00
Wolfgang Bumiller
703c2dee04
api-macro: mark parameter defaults as #[allow(dead_code)]
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-28 10:56:28 +01:00
Wolfgang Bumiller
ca92328569
api-macro: bump to 1.3.1-1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-15 12:36:57 +01:00
Wolfgang Bumiller
62e105a34e
api-macro: bump to 1.3.0-1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-09 14:21:53 +01:00
Wolfgang Bumiller
dce9102163
api-macro: add json_schema!() macro
...
This allows using the json schema notation to generate `Schema`
expressions.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-09 14:19:42 +01:00
Maximiliano Sandoval
3492a0cee5
elide lifetimes where possible
...
This is possible on newer rustc.
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
2024-12-03 13:44:05 +01:00
Thomas Lamprecht
f4868ff519
tree-wide: check in d/control meta changes for newer debcargo
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-26 14:44:33 +01:00
Thomas Lamprecht
ba3ee7a4db
api-marcro: throw compiler error if description for enums is empty
...
A description is required for the API schema types and we fallback to
the rust doc-comment when no explicit one is set.
But a empty string was returned if no doc-comment existed, so check
for the comment to be non-empty and throw a compile-time error
otherwise.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-10-22 15:14:43 +02:00
Wolfgang Bumiller
f7e130d5b5
api-macro: bump d/control
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-09-26 14:56:56 +02:00
Wolfgang Bumiller
d601b57fd0
api-macro: bump to 1.2.1-1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-09-26 14:52:52 +02:00
Wolfgang Bumiller
2b3c356ece
api-macro: allow declaring an additional-properties field
...
Object schemas can now declare a field which causes
'additional_properties' to be set to true and the field being ignored
in the schema.
This allows adding a flattened HashMap<String, Value> to gather the
additional unspecified properties.
#[api(additional_properties: "rest")]
struct Something {
#[serde(flatten)]
rest: HashMap<String, Value>,
}
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-09-26 12:47:58 +02:00
Wolfgang Bumiller
d6e86d670b
tree-wide: unify workspace inherited attributes
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-09-20 08:42:45 +02:00
Wolfgang Bumiller
dfc4e5f866
api-macro: bump to 1.2.0-1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-09-05 14:15:11 +02:00
Wolfgang Bumiller
8021f0a7f6
api-macro: support new streaming api methods
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-09-05 14:15:11 +02:00
Wolfgang Bumiller
c31eaf0018
router, rest-server, api-macro: rename Streaming api to Serializing
...
This does not "stream", but rather skips the intermediate step to
serialize the entire output into a local json string.
We now reserve the "Stream*" prefix for actual *streaming*, that is,
producing an API response which gets streamed continuously as it is
asynchronously produced.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-09-05 14:15:11 +02:00
Wolfgang Bumiller
c3713cffe5
api-macro: fix warnings in tests
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-08-06 14:23:38 +02:00
Wolfgang Bumiller
15c64a5d00
api-macro: bump to 1.1.0
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-08-06 14:15:57 +02:00
Wolfgang Bumiller
839f508f55
api-macro: type-key support for derived enums
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-08-06 14:14:42 +02:00
Wolfgang Bumiller
4d96aa52d2
section-config, api-macro: add SectionConfig enum support
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-08-06 14:14:42 +02:00
Wolfgang Bumiller
51d78fdd2b
api-macro: handle renames in updater derive
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-08-06 14:14:42 +02:00
Maximiliano Sandoval
254a37ae07
fix typos in code documentation
...
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
2024-07-22 08:49:42 +02:00
Maximiliano Sandoval
72ab48eb55
fix typos in rust api documentation
...
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
2024-07-22 08:49:42 +02:00
Wolfgang Bumiller
4de22b9728
api-macro: fix warnigns
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-07-17 13:43:37 +02:00
Wolfgang Bumiller
0652d81977
tree-wide: enable doc_cfg and doc_auto_cfg for docs
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-07-02 11:59:53 +02:00
Maximiliano Sandoval
d07a0243f4
use const blocks in thread_local! calls
...
Fixes the clippy warning:
warning: initializer for `thread_local` value can be made `const`
--> proxmox-router/src/cli/command.rs:221:71
|
221 | static HELP_CONTEXT: RefCell<Option<Arc<CommandLineInterface>>> = RefCell::new(None);
| ^^^^^^^^^^^^^^^^^^ help: replace with: `const { RefCell::new(None) }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#thread_local_initializer_can_be_made_const
= note: `#[warn(clippy::thread_local_initializer_can_be_made_const)]` on by default
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
2024-06-28 10:22:58 +02:00
Fabian Grünbichler
6f532dfb7d
various clippy fixes
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2024-06-06 11:40:49 +02:00
Wolfgang Bumiller
ca6ca904ad
bump proxmox-api-macro to 1.0.8-1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-02-02 13:56:01 +01:00
Wolfgang Bumiller
1f377da07c
bump api-macro to 1.0.7-1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-12-06 16:02:42 +01:00
Wolfgang Bumiller
2435ab29e2
api-macro: make skip_serializing_if without default an error
...
except for Option types, since this causes deserialization issues
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-12-06 14:39:47 +01:00
Wolfgang Bumiller
89b29415a4
api-macro: add VariantAttrib
...
separated out of FieldAttrib without the `flatten` attribute, since we
don't support this on enum variants
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-12-06 14:39:47 +01:00
Wolfgang Bumiller
fa9a50a0b7
api-macro: rename SerdeAttrib to FieldAttrib
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-12-06 14:39:47 +01:00
Fabian Grünbichler
04e2d0e5c3
bump proxmox-api-macro to 1.0.6-1
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-10-03 09:37:01 +02:00
Wolfgang Bumiller
b232b580a0
update to syn 2
...
This mostly affected attribute parsing (due to the syn::Meta changes).
Also creating `DelimSpan`s for custom-built `syn::Attribute`s is a
bit... ugly.
Upshot: turns out we can drop some helpers in util.rs with the new
`syn::Meta` changes.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-09-29 13:52:21 +02:00
Lukas Wagner
268fcfb43a
clippy fix: this (Default) impl
can be derived
...
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-08-08 11:29:36 +02:00
Wolfgang Bumiller
34a79cdd0c
bump proxmox-api-macro to 1.0.5-1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-08-03 08:25:13 +02:00
Wolfgang Bumiller
8f8d52f148
update d/copyright files to debian copyright-format 1.0
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-05-23 13:02:39 +02:00
Wolfgang Bumiller
12674a37e0
api-macro: support non-idents in serde(rename)
...
For PVE we'll have enum variants like /dev/urandom...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-04-03 10:01:44 +02:00
Fabian Grünbichler
acaf55c437
clippy fix
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-13 14:56:42 +01:00
Wolfgang Bumiller
7bc85c05c9
bump proxmox-api-macro to 1.0.4-1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-12-12 11:34:18 +01:00
Wolfgang Bumiller
38a60d3acb
api: support #[default] attribute
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-12-12 11:34:18 +01:00
Fabian Grünbichler
8316fd3899
more workspace dependencies
...
regex was missed in the first pass, and two intra-workspace dev-dependencies as
well.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-12 09:30:30 +01:00
Fabian Grünbichler
4189221470
inherit shared, external dependencies
...
noteworthy changes:
- proxmox-http had a default_features_false dep on hyper, which is dropped (the
default feature is empty anyway)
- hyper, libc, nix, tokio and url versions are unified
- missing (cosmetic) bindgen feature on zstd enabled everywhere
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-07 09:48:38 +01:00
Fabian Grünbichler
64959d9ae0
move common metadata to workspace
...
and switch all crates to 2021 edition as well as a unified "authors" value.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-07 09:48:25 +01:00
Fabian Grünbichler
5ec765f842
update d/control files
...
debcargo 2.6 changed some minor details
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-06 11:21:43 +01:00
Thomas Lamprecht
f92c8f92cc
api-macro: track d/control
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-08-26 12:57:57 +02:00
Wolfgang Bumiller
31a569b425
api-macro: clippy fixes
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-27 10:52:07 +02:00
Wolfgang Bumiller
7b1aad429f
api-macro: clippy fixes
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-06-29 10:10:07 +02:00
Wolfgang Bumiller
17805f9791
api-macro: doc update
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-05-23 10:34:57 +02:00
Wolfgang Bumiller
b49f3554c7
bump proxmox-api-macro to 1.0.3-1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-05-19 12:04:03 +02:00