From 017b81712ef00e7b61a938a6b8dcbfe207184bfb Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Tue, 3 Aug 2021 13:31:44 +0200 Subject: [PATCH] api macro: assume that field types are api types by default #[api] struct Foo { field: Bar, } does not require the use of #[api( properties: { field: { type: Bar, }, }, )] anymore Signed-off-by: Wolfgang Bumiller --- proxmox-api-macro/src/util.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/proxmox-api-macro/src/util.rs b/proxmox-api-macro/src/util.rs index b4ddcc01..87d29a5e 100644 --- a/proxmox-api-macro/src/util.rs +++ b/proxmox-api-macro/src/util.rs @@ -496,7 +496,12 @@ pub fn infer_type(schema: &mut Schema, ty: &syn::Type) -> Result "cannot infer parameter type from this rust type"); + // bail!(ty => "cannot infer parameter type from this rust type"); + schema.item = SchemaItem::ExternType(syn::ExprPath { + attrs: Vec::new(), + qself: path.qself.clone(), + path: path.path.clone(), + }); } } _ => (),