Compare commits

..

2 Commits

Author SHA1 Message Date
ed0d8e05f1 Bump version 2023-02-03 09:57:21 +01:00
bda9cc3fad Add schema 2023-02-03 09:56:32 +01:00
4 changed files with 15 additions and 4 deletions

2
Cargo.lock generated
View File

@@ -224,7 +224,7 @@ checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66"
[[package]]
name = "openapi-parser"
version = "0.1.0"
version = "0.2.0"
dependencies = [
"clap",
"env_logger",

View File

@@ -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.1.0"
version = "0.2.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@@ -1,2 +1,13 @@
# OPENAPI Parser
Basic library to extract schema structures from OpenAPI 3 documents.
Basic library to extract schema structures from OpenAPI 3 documents.
This crate can be used as a standalone binary:
```bash
cargo install openapi-parser
```
Create a tree graph for a schema:
```bash
openapi-parser -f openapi.yaml -s MySchema graph | dot -Tpng > dest.png
```

View File

@@ -45,7 +45,7 @@ pub enum NodeType {
/// Object value
Object {
/// Required filed for the object
required: Option<Vec<String>>,*
required: Option<Vec<String>>,
/// The children of the object
children: Vec<TreeNode>,
},