#180 - Changed tasks to dictionaries

Modifications based on change
This commit is contained in:
Petr Kalis 2020-09-25 12:46:05 +02:00
parent f8e558ca42
commit c615e79728
4 changed files with 180 additions and 1 deletions

View file

@ -51,7 +51,7 @@ def check_regex(name, entity_type, in_schema=None, schema_patterns=None):
if in_schema:
schema_name = in_schema
elif entity_type == "project":
schema_name = "project-2.0"
schema_name = "project-2.1"
elif entity_type == "task":
schema_name = "task"

83
schema/config-1.1.json Normal file
View file

@ -0,0 +1,83 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "avalon-core:config-1.1",
"description": "A project configuration.",
"type": "object",
"additionalProperties": false,
"required": [
"template",
"tasks",
"apps"
],
"properties": {
"schema": {
"description": "Schema identifier for payload",
"type": "string"
},
"template": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^.*$": {
"type": "string"
}
}
},
"tasks": {
"type": "object",
"properties": {
"short_name": {"type": "string"},
"icon": {"type": "string"},
"group": {"type": "string"},
"label": {"type": "string"}
},
"required": ["short_name"]
},
"apps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {"type": "string"},
"icon": {"type": "string"},
"group": {"type": "string"},
"label": {"type": "string"}
},
"required": ["name"]
}
},
"families": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {"type": "string"},
"icon": {"type": "string"},
"label": {"type": "string"},
"hideFilter": {"type": "boolean"}
},
"required": ["name"]
}
},
"groups": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {"type": "string"},
"icon": {"type": "string"},
"color": {"type": "string"},
"order": {"type": ["integer", "number"]}
},
"required": ["name"]
}
},
"copy": {
"type": "object"
}
}
}

10
schema/inventory-1.1.json Normal file
View file

@ -0,0 +1,10 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "avalon-core:config-1.1",
"description": "A project configuration.",
"type": "object",
"additionalProperties": true
}

86
schema/project-2.1.json Normal file
View file

@ -0,0 +1,86 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "avalon-core:project-2.1",
"description": "A unit of data",
"type": "object",
"additionalProperties": true,
"required": [
"schema",
"type",
"name",
"data",
"config"
],
"properties": {
"schema": {
"description": "Schema identifier for payload",
"type": "string",
"enum": ["avalon-core:project-2.1"],
"example": "avalon-core:project-2.1"
},
"type": {
"description": "The type of document",
"type": "string",
"enum": ["project"],
"example": "project"
},
"parent": {
"description": "Unique identifier to parent document",
"example": "592c33475f8c1b064c4d1696"
},
"name": {
"description": "Name of directory",
"type": "string",
"pattern": "^[a-zA-Z0-9_.]*$",
"example": "hulk"
},
"data": {
"description": "Document metadata",
"type": "object",
"example": {
"fps": 24,
"width": 1920,
"height": 1080
}
},
"config": {
"type": "object",
"description": "Document metadata",
"example": {
"schema": "avalon-core:config-1.1",
"apps": [
{
"name": "maya2016",
"label": "Autodesk Maya 2016"
},
{
"name": "nuke10",
"label": "The Foundry Nuke 10.0"
}
],
"tasks": {
"Model": {"short_name": "mdl"},
"Render": {"short_name": "rnd"},
"Animate": {"short_name": "anim"},
"Rig": {"short_name": "rig"},
"Lookdev": {"short_name": "look"},
"Layout": {"short_name": "lay"}
},
"template": {
"work":
"{root}/{project}/{silo}/{asset}/work/{task}/{app}",
"publish":
"{root}/{project}/{silo}/{asset}/publish/{subset}/v{version:0>3}/{subset}.{representation}"
}
},
"$ref": "config-1.1.json"
}
},
"definitions": {}
}