forked from saalfeldlab/render
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtransformSpec.schema.json
99 lines (99 loc) · 3.96 KB
/
transformSpec.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "TransformSpec",
"description": "Specification of an image transform",
"type": "object",
"anyOf" : [
{ "$ref": "#/definitions/interpolatedTransformSpec" },
{ "$ref": "#/definitions/leafTransformSpec" },
{ "$ref": "#/definitions/listTransformSpec" },
{ "$ref": "#/definitions/referenceTransformSpec" }
],
"definitions": {
"anyTransformSpec" : {
"description" : "set of possible transform specification types",
"type" : "object",
"anyOf" : [
{ "$ref": "#/definitions/interpolatedTransformSpec" },
{ "$ref": "#/definitions/leafTransformSpec" },
{ "$ref": "#/definitions/listTransformSpec" },
{ "$ref": "#/definitions/referenceTransformSpec" }
]
},
"interpolatedTransformSpec" : {
"description" : "specification for an interpolation between 2 transforms",
"type" : "object",
"properties" : {
"type" : { "enum" : [ "interpolated" ] },
"id": { "$ref": "#/definitions/transformId" },
"metaData": { "$ref": "#/definitions/transformMetaData" },
"a": { "$ref": "#/definitions/anyTransformSpec" },
"b": { "$ref": "#/definitions/anyTransformSpec" },
"lambda": {
"type" : "number"
}
},
"required": [ "type", "a", "b", "lambda" ]
},
"leafTransformSpec" : {
"description" : "specification for a transform that can be directly implemented",
"type" : "object",
"properties" : {
"id" : { "$ref": "#/definitions/transformId" },
"metaData" : { "$ref": "#/definitions/transformMetaData" },
"className" : {
"description" : "full Java class name for transform implementation",
"type" : "string"
},
"dataString" : {
"description": "properties specifying the transformation",
"type": "string"
}
},
"required": [ "className", "dataString" ]
},
"listTransformSpec" : {
"description" : "ordered list of transform specifications",
"type" : "object",
"properties" : {
"id": { "$ref": "#/definitions/transformId" },
"metaData": { "$ref": "#/definitions/transformMetaData" },
"type": { "enum": ["list"] },
"specList": {
"type": "array",
"items": { "$ref": "#/definitions/anyTransformSpec" }
}
},
"required": [ "type", "specList" ]
},
"referenceTransformSpec" : {
"description" : "reference to another transform specification",
"type" : "object",
"properties" : {
"type" : { "enum" : [ "ref" ] },
"id": { "$ref": "#/definitions/transformId" },
"metaData": { "$ref": "#/definitions/transformMetaData" },
"refId": { "$ref": "#/definitions/transformId" }
},
"required": ["type", "refId"]
},
"transformId" : {
"description" : "uniquely identifies transform specification",
"type" : "string"
},
"transformMetaData" : {
"description" : "any data about the transform that is not needed for rendering",
"type" : "object",
"properties" : {
"labels" : {
"description" : "set of labels for a transform",
"type" : "array",
"uniqueItems": true,
"items": {
"type": "string"
}
}
}
}
}
}