{ "$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" } } ] }