Skip to content

Commit

Permalink
update diagram schema
Browse files Browse the repository at this point in the history
Signed-off-by: Teo Koon Peng <[email protected]>
  • Loading branch information
koonpeng committed Nov 21, 2024
1 parent 9eab0d6 commit 5ac7cf1
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 14 deletions.
65 changes: 52 additions & 13 deletions diagram.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@
"title": "Diagram",
"type": "object",
"definitions": {
"Vertex": {
"type": "object",
"DiagramOperation": {
"oneOf": [
{
"type": "object",
"required": [
"next",
"type"
],
"properties": {
"next": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
Expand All @@ -37,10 +40,15 @@
{
"type": "object",
"required": [
"next",
"nodeId",
"type"
],
"properties": {
"config": true,
"next": {
"type": "string"
},
"nodeId": {
"type": "string"
},
Expand All @@ -51,19 +59,50 @@
]
}
}
}
],
"required": [
"edges"
],
"properties": {
"edges": {
"type": "array",
"items": {
"type": "string"
},
{
"type": "object",
"required": [
"next",
"type"
],
"properties": {
"next": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string",
"enum": [
"forkClone"
]
}
}
},
{
"type": "object",
"required": [
"next",
"type"
],
"properties": {
"next": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string",
"enum": [
"unzip"
]
}
}
}
}
]
}
}
}
2 changes: 1 addition & 1 deletion src/diagram/generate_schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ mod test {
if cur_schema_json.len() != new_schema_json.len()
|| zip(cur_schema_json, new_schema_json).any(|(a, b)| a != b)
{
return Err(String::from("There are changes in the json schema, please run `cargo run generate_schema` to regenerate it"));
return Err(String::from("There are changes in the json schema, please run `cargo run -F=diagram generate_schema` to regenerate it"));
}
Ok(())
}
Expand Down

0 comments on commit 5ac7cf1

Please sign in to comment.