mirror of
https://git.proxmox.com/git/proxmox
synced 2025-06-01 04:59:18 +00:00
proxmox-api/src/format.rs: add missing docs
This commit is contained in:
parent
8f7127a9aa
commit
00f3a6575c
@ -68,7 +68,10 @@ fn test_wrap_text() {
|
|||||||
assert_eq!(wrapped, expect);
|
assert_eq!(wrapped, expect);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// TODO: Document output format.
|
/// Helper to format the type text
|
||||||
|
///
|
||||||
|
/// The result is a short string including important constraints, for
|
||||||
|
/// example ``<integer> (0 - N)``.
|
||||||
pub fn get_schema_type_text(schema: &Schema, _style: ParameterDisplayStyle) -> String {
|
pub fn get_schema_type_text(schema: &Schema, _style: ParameterDisplayStyle) -> String {
|
||||||
match schema {
|
match schema {
|
||||||
Schema::Null => String::from("<null>"), // should not happen
|
Schema::Null => String::from("<null>"), // should not happen
|
||||||
@ -85,7 +88,7 @@ pub fn get_schema_type_text(schema: &Schema, _style: ParameterDisplayStyle) -> S
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// TODO: Document output format.
|
/// Helper to format an object property, including name, type and description.
|
||||||
pub fn get_property_description(
|
pub fn get_property_description(
|
||||||
name: &str,
|
name: &str,
|
||||||
schema: &Schema,
|
schema: &Schema,
|
||||||
@ -246,7 +249,7 @@ fn dump_method_definition(method: &str, path: &str, def: Option<&ApiMethod>) ->
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// TODO: Document output format.
|
/// Generate ReST Documentaion for a complete API defined by a ``Router``.
|
||||||
pub fn dump_api(
|
pub fn dump_api(
|
||||||
output: &mut dyn Write,
|
output: &mut dyn Write,
|
||||||
router: &Router,
|
router: &Router,
|
||||||
|
Loading…
Reference in New Issue
Block a user