api-macros: Fix docs for associated METADATA types
This commit is contained in:
parent
67d113ba57
commit
3d1ab0cd3f
@ -218,6 +218,7 @@ impl ToTokens for Api {
|
|||||||
|
|
||||||
let body = self.response.to_body();
|
let body = self.response.to_body();
|
||||||
|
|
||||||
|
let metadata_doc = format!("Metadata for the `{}` API endpoint.", name);
|
||||||
let request_doc = format!(
|
let request_doc = format!(
|
||||||
"Data for a request to the `{}` API endpoint.\n\n{}",
|
"Data for a request to the `{}` API endpoint.\n\n{}",
|
||||||
name,
|
name,
|
||||||
@ -329,8 +330,7 @@ impl ToTokens for Api {
|
|||||||
type EndpointError = #error;
|
type EndpointError = #error;
|
||||||
type IncomingResponse = <Response as #ruma_api_import::Outgoing>::Incoming;
|
type IncomingResponse = <Response as #ruma_api_import::Outgoing>::Incoming;
|
||||||
|
|
||||||
// FIXME: Doc string interpolation
|
#[doc = #metadata_doc]
|
||||||
/// Metadata for the `#name` endpoint.
|
|
||||||
const METADATA: #ruma_api_import::Metadata = __METADATA;
|
const METADATA: #ruma_api_import::Metadata = __METADATA;
|
||||||
|
|
||||||
#[allow(unused_mut, unused_variables)]
|
#[allow(unused_mut, unused_variables)]
|
||||||
@ -365,8 +365,7 @@ impl ToTokens for Api {
|
|||||||
type EndpointError = #error;
|
type EndpointError = #error;
|
||||||
type OutgoingResponse = Response;
|
type OutgoingResponse = Response;
|
||||||
|
|
||||||
// FIXME: Doc string interpolation
|
#[doc = #metadata_doc]
|
||||||
/// Metadata for the `#name` endpoint.
|
|
||||||
const METADATA: #ruma_api_import::Metadata = __METADATA;
|
const METADATA: #ruma_api_import::Metadata = __METADATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user