From add4b2e7fbc87aa9b64d1829f20cac208b0faca8 Mon Sep 17 00:00:00 2001 From: Thomas Sibley Date: Mon, 14 Feb 2022 11:31:30 -0800 Subject: [PATCH] schemas: Extend export v2 schema to support an array of trees Supports the new multi-tree or exploded tree features in Auspice, while maintaining backwards compatibility. Resolves #848. --- augur/data/schema-export-v2.json | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/augur/data/schema-export-v2.json b/augur/data/schema-export-v2.json index 82415fe48..8a6b428c4 100644 --- a/augur/data/schema-export-v2.json +++ b/augur/data/schema-export-v2.json @@ -298,6 +298,19 @@ } } }, + "tree": { + "description": "One or more phylogenies using a nested JSON structure", + "oneOf": [ + {"$ref": "#/$defs/tree"}, + { + "type": "array", + "minItems": 1, + "items": {"$ref": "#/$defs/tree"} + } + ] + } + }, + "$defs": { "tree": { "type" : "object", "$comment": "The phylogeny in a nested JSON structure", @@ -500,7 +513,7 @@ "$comment": "Polytomies (more than 2 items) allowed, as are nodes with a single child.", "type": "array", "minItems": 1, - "items": {"$ref": "#/properties/tree"} + "items": {"$ref": "#/$defs/tree"} } } }