remove trailing doc comment lines
This commit is contained in:
parent
e53fa0b631
commit
ed27e3d714
|
@ -124,6 +124,9 @@ fn method_docs(spec: &OpenApiV2, op: &Operation) -> eyre::Result<String> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if out.ends_with("/// \n") {
|
||||||
|
out.truncate(out.len() - 5);
|
||||||
|
}
|
||||||
Ok(out)
|
Ok(out)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -90,6 +90,9 @@ pub fn create_struct_for_definition(
|
||||||
fields.push_str(line);
|
fields.push_str(line);
|
||||||
fields.push_str("\n/// \n");
|
fields.push_str("\n/// \n");
|
||||||
}
|
}
|
||||||
|
if fields.ends_with("/// \n") {
|
||||||
|
fields.truncate(fields.len() - 5);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if &field_name != prop_name {
|
if &field_name != prop_name {
|
||||||
|
@ -173,6 +176,9 @@ fn create_struct_docs_str(description: Option<&str>) -> eyre::Result<String> {
|
||||||
out.push_str(line);
|
out.push_str(line);
|
||||||
out.push_str("\n/// \n");
|
out.push_str("\n/// \n");
|
||||||
}
|
}
|
||||||
|
if out.ends_with("/// \n") {
|
||||||
|
out.truncate(out.len() - 5);
|
||||||
|
}
|
||||||
out
|
out
|
||||||
}
|
}
|
||||||
None => String::new(),
|
None => String::new(),
|
||||||
|
@ -265,6 +271,9 @@ fn create_query_struct(spec: &OpenApiV2, op: &Operation) -> eyre::Result<String>
|
||||||
fields.push_str(line);
|
fields.push_str(line);
|
||||||
fields.push_str("\n/// \n");
|
fields.push_str("\n/// \n");
|
||||||
}
|
}
|
||||||
|
if fields.ends_with("/// \n") {
|
||||||
|
fields.truncate(fields.len() - 5);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
fields.push_str("pub ");
|
fields.push_str("pub ");
|
||||||
fields.push_str(&field_name);
|
fields.push_str(&field_name);
|
||||||
|
|
642
src/generated.rs
642
src/generated.rs
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue