api-macro: make API_{RETURN,PARAMETER}_SCHEMA_... public

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2020-02-27 13:08:59 +01:00
parent 739b3e2721
commit dd8ccd80d9

View File

@ -85,7 +85,7 @@ pub fn handle_method(mut attribs: JSONObject, mut func: syn::ItemFn) -> Result<T
let mut inner = TokenStream::new();
schema.to_schema(&mut inner)?;
returns_schema_definition = quote_spanned! { func.sig.span() =>
#vis const #return_schema_name: &'static ::proxmox::api::schema::Schema = (#inner);
pub const #return_schema_name: &'static ::proxmox::api::schema::Schema = (#inner);
};
returns_schema_setter = quote! { .returns(#return_schema_name) };
}
@ -99,7 +99,7 @@ pub fn handle_method(mut attribs: JSONObject, mut func: syn::ItemFn) -> Result<T
Ok(quote_spanned! { func.sig.span() =>
#returns_schema_definition
#vis const #input_schema_name: &'static ::proxmox::api::schema::ObjectSchema =
pub const #input_schema_name: &'static ::proxmox::api::schema::ObjectSchema =
(&#input_schema);
#vis const #api_method_name: ::proxmox::api::ApiMethod =