Compare commits
2 Commits
90ad7cfe45
...
97966c983a
| Author | SHA1 | Date | |
|---|---|---|---|
| 97966c983a | |||
| bf2aada26f |
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -221,7 +221,7 @@ checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66"
|
||||
|
||||
[[package]]
|
||||
name = "openapi-parser"
|
||||
version = "0.4.5"
|
||||
version = "0.4.6"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"env_logger",
|
||||
|
||||
@@ -4,7 +4,7 @@ description = "Extract schemas definitions tree from OpenAPI documents"
|
||||
authors = ["Pierre Hubert <pierre.hubert.git@communiquons.org>"]
|
||||
license = "MIT"
|
||||
repository = "https://gitea.communiquons.org/pierre/OpenAPI-Parser"
|
||||
version = "0.4.5"
|
||||
version = "0.4.6"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
@@ -85,10 +85,11 @@ fn recurse_export(
|
||||
out: &mut String,
|
||||
already_processed: &mut HashSet<String>,
|
||||
) {
|
||||
if already_processed.contains(&node.name) {
|
||||
let key = format!("{} #> {}", parent_name, node.name);
|
||||
if already_processed.contains(&key) {
|
||||
return;
|
||||
}
|
||||
already_processed.insert(node.name.to_string());
|
||||
already_processed.insert(key);
|
||||
|
||||
if !parent_name.is_empty() && matches!(node.r#type, NodeType::Object { .. }) {
|
||||
writeln!(out, "\"{}\" -> \"{}\";", parent_name, node.name).unwrap();
|
||||
|
||||
Reference in New Issue
Block a user