added workfile schema

This commit is contained in:
iLLiCiTiT 2021-01-07 16:30:47 +01:00
parent 0cf9cfc8f1
commit 2d6033aaff
2 changed files with 53 additions and 0 deletions

View file

@ -434,6 +434,7 @@ def create_workfile_doc(asset_doc, task_name, filename, workdir, dbcon=None):
template_workdir.rootless.replace("\\", "/")
)
doc_data["schema"] = "pype:workfile-1.0"
doc_data["files"] = ["/".join([rootles_workdir, filename])]
doc_data["data"] = {}

52
schema/workfile-1.0.json Normal file
View file

@ -0,0 +1,52 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "pype:workfile-1.0",
"description": "Workfile additional information.",
"type": "object",
"additionalProperties": true,
"required": [
"schema",
"type",
"filename",
"task_name",
"parent"
],
"properties": {
"schema": {
"description": "Schema identifier for payload",
"type": "string",
"enum": ["pype:workfile-1.0"],
"example": "pype:workfile-1.0"
},
"type": {
"description": "The type of document",
"type": "string",
"enum": ["workfile"],
"example": "workfile"
},
"parent": {
"description": "Unique identifier to parent document",
"example": "592c33475f8c1b064c4d1696"
},
"filename": {
"description": "Workfile's filename",
"type": "string",
"example": "kuba_each_case_Alpaca_01_animation_v001.ma"
},
"task_name": {
"description": "Task name",
"type": "string",
"example": "animation"
},
"data": {
"description": "Document metadata",
"type": "object",
"example": {"key": "value"}
}
}
}