Skip to content

Commit 0c34ce9

Browse files
committed
update output format
1 parent 813a7d3 commit 0c34ce9

File tree

4 files changed

+919
-915
lines changed

4 files changed

+919
-915
lines changed

compiler-rs/clients_schema_to_openapi/src/paths.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -412,12 +412,16 @@ fn split_summary_desc(desc: &str) -> SplitDesc{
412412

413413
fn add_privileges(privileges: &Option<Privileges>) -> Option<String>{
414414
if let Some(privs) = privileges {
415-
let mut result = "Required privileges:".to_string();
415+
let mut result = "\n ##Required authorization\n".to_string();
416416
if privs.index.len()>0 {
417-
result = result + " index-privileges: " + &privs.index.join(",");
417+
result = result + "* Index privileges: " + &privs.index.iter()
418+
.map(|a| {"`".to_string() + a + "`"})
419+
.collect::<Vec<String>>().join(",");
418420
}
419421
if privs.cluster.len()>0 {
420-
result = result + " cluster-privileges: " + &privs.cluster.join(",");
422+
result = result + " * Cluster privileges: " + &privs.cluster.iter()
423+
.map(|a| {"`".to_string() + a + "`"})
424+
.collect::<Vec<String>>().join(",");
421425
}
422426
return Some(result)
423427
}
Binary file not shown.

0 commit comments

Comments
 (0)