api-macro: error on unexpected keys
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
2c83d55cb0
commit
19ad65ac84
@ -45,6 +45,14 @@ pub fn handle_method(mut attribs: JSONObject, mut func: syn::ItemFn) -> Result<T
|
||||
.transpose()?
|
||||
.unwrap_or(false);
|
||||
|
||||
if !attribs.is_empty() {
|
||||
bail!(
|
||||
attribs.span(),
|
||||
"unexpected api elements: {}",
|
||||
util::join_debug(", ", attribs.elements.keys()),
|
||||
);
|
||||
}
|
||||
|
||||
let (doc_comment, doc_span) = util::get_doc_comments(&func.attrs)?;
|
||||
util::derive_descriptions(
|
||||
&mut input_schema,
|
||||
|
Loading…
Reference in New Issue
Block a user