From ef240a387944c72c8ccad0890e9e0eb3c2e9ba3a Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Fri, 2 Oct 2020 11:04:29 +0200 Subject: [PATCH] Fix schemas for correct creation from empty DB --- schema/config-1.1.json | 22 +++++++++++++--------- schema/inventory-1.1.json | 2 +- schema/project-2.1.json | 6 +++--- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/schema/config-1.1.json b/schema/config-1.1.json index 5f4fe4b2fb..ea5ab0ff27 100644 --- a/schema/config-1.1.json +++ b/schema/config-1.1.json @@ -1,14 +1,13 @@ { "$schema": "http://json-schema.org/draft-04/schema#", - "title": "avalon-core:config-1.1", + "title": "pype:config-1.1", "description": "A project configuration.", "type": "object", "additionalProperties": false, "required": [ - "template", "tasks", "apps" ], @@ -29,13 +28,18 @@ }, "tasks": { "type": "object", - "properties": { - "short_name": {"type": "string"}, - "icon": {"type": "string"}, - "group": {"type": "string"}, - "label": {"type": "string"} - }, - "required": ["short_name"] + "items": { + "type": "object", + "properties": { + "name": {"type": "string"}, + "icon": {"type": "string"}, + "group": {"type": "string"}, + "label": {"type": "string"} + }, + "required": [ + "short_name" + ] + } }, "apps": { "type": "array", diff --git a/schema/inventory-1.1.json b/schema/inventory-1.1.json index f46df6973d..1b572b7d23 100644 --- a/schema/inventory-1.1.json +++ b/schema/inventory-1.1.json @@ -1,7 +1,7 @@ { "$schema": "http://json-schema.org/draft-04/schema#", - "title": "avalon-core:config-1.1", + "title": "pype:config-1.1", "description": "A project configuration.", "type": "object", diff --git a/schema/project-2.1.json b/schema/project-2.1.json index 22327b2f06..40e3bdb638 100644 --- a/schema/project-2.1.json +++ b/schema/project-2.1.json @@ -1,7 +1,7 @@ { "$schema": "http://json-schema.org/draft-04/schema#", - "title": "avalon-core:project-2.1", + "title": "pype:project-2.1", "description": "A unit of data", "type": "object", @@ -20,7 +20,7 @@ "schema": { "description": "Schema identifier for payload", "type": "string", - "enum": ["avalon-core:project-2.1"], + "enum": ["avalon-core:project-2.1", "pype:project-2.1"], "example": "avalon-core:project-2.1" }, "type": { @@ -52,7 +52,7 @@ "type": "object", "description": "Document metadata", "example": { - "schema": "avalon-core:config-1.1", + "schema": "pype:config-1.1", "apps": [ { "name": "maya2016",