mirror of
https://git.proxmox.com/git/proxmox
synced 2025-05-31 04:56:54 +00:00
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()?
|
.transpose()?
|
||||||
.unwrap_or(false);
|
.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)?;
|
let (doc_comment, doc_span) = util::get_doc_comments(&func.attrs)?;
|
||||||
util::derive_descriptions(
|
util::derive_descriptions(
|
||||||
&mut input_schema,
|
&mut input_schema,
|
||||||
|
Loading…
Reference in New Issue
Block a user