Support .archify diagram files (0.2.0)
.archify files are Archify JSON diagram sources. They open as JSON, preview with the same commands, report validation problems, and get completion from a schema that dispatches on diagram_type. Adds a hello.archify example and tests for detection, the dispatching schema and the VS Code behaviour. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,98 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"title": "Archify Diagram",
|
||||
"description": "An Archify diagram source. diagram_type selects the schema that applies.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"diagram_type"
|
||||
],
|
||||
"properties": {
|
||||
"diagram_type": {
|
||||
"enum": [
|
||||
"architecture",
|
||||
"workflow",
|
||||
"sequence",
|
||||
"dataflow",
|
||||
"lifecycle"
|
||||
],
|
||||
"description": "Kind of diagram: architecture, workflow, sequence, dataflow or lifecycle."
|
||||
}
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"diagram_type": {
|
||||
"const": "architecture"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"diagram_type"
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
"$ref": "architecture.schema.json"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"diagram_type": {
|
||||
"const": "workflow"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"diagram_type"
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
"$ref": "workflow.schema.json"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"diagram_type": {
|
||||
"const": "sequence"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"diagram_type"
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
"$ref": "sequence.schema.json"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"diagram_type": {
|
||||
"const": "dataflow"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"diagram_type"
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
"$ref": "dataflow.schema.json"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"diagram_type": {
|
||||
"const": "lifecycle"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"diagram_type"
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
"$ref": "lifecycle.schema.json"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user