-
Notifications
You must be signed in to change notification settings - Fork 943
/
state.schema.json
78 lines (76 loc) · 3.48 KB
/
state.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
{
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Jupyter Interactive Widget State JSON schema.",
"type": "object",
"properties" : {
"version_major" : {
"description": "Format version (major)",
"type": "number",
"minimum": 2,
"maximum": 2
},
"version_minor" : {
"description": "Format version (minor)",
"type": "number",
"minimum": 0,
"maximum": 0
},
"state": {
"description": "Model State for All Widget Models - keys are model ids, values are model state",
"type": "object",
"additionalProperties" : {
"type": "object",
"properties": {
"model_name": {
"description" : "Name of the JavaScript class holding the model implementation",
"type": "string"
},
"model_module": {
"description" : "Name of the JavaScript module holding the model implementation",
"type": "string"
},
"model_module_version": {
"description" : "Semver range for the JavaScript module holding the model implementation",
"type": "string"
},
"state": {
"description" : "Serialized state of the model",
"type": "object"
},
"buffers": {
"description": "Binary buffers in the state",
"type": "array",
"items": {
"type": "object",
"properties": {
"path": {
"description": "A path for a binary buffer value.",
"type": "array",
"items": {
"description": "An object key or array index",
"type": ["string", "number"]
}
},
"data": {
"description" : "A binary buffer encoded as specified in the 'encoding' property",
"type": "string"
},
"encoding": {
"description": "The encoding of the buffer data",
"type": "string",
"oneOf": [
{"enum": ["hex"], "description": "Base 16 encoding, as specified in RFC 4648, section 8 (https://tools.ietf.org/html/rfc4648#section-8)"},
{"enum": ["base64"], "description": "Base 64 encoding, as specified in RFC 4648, section 4 (https://tools.ietf.org/html/rfc4648#section-4)"}
]
}
},
"required": ["path", "data", "encoding"]
}
}
},
"required": [ "model_name", "model_module", "state" ]
}
}
},
"required": [ "version_major", "version_minor", "state" ]
}