-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathsmcat-ast.schema.json
173 lines (173 loc) · 6.54 KB
/
smcat-ast.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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "state-machine-cat abstract syntax tree schema",
"$ref": "#/definitions/StateMachineType",
"$id": "org.js.state-machine-cat/v7.4.0",
"definitions": {
"StateType": {
"type": "string",
"enum": [
"regular",
"initial",
"terminate",
"final",
"parallel",
"history",
"deephistory",
"choice",
"forkjoin",
"fork",
"join",
"junction"
]
},
"TransitionType": {
"type": "string",
"enum": ["internal", "external"]
},
"NoteType": {
"type": "array",
"items": {
"type": "string"
}
},
"ActionTypeType": {
"type": "string",
"enum": ["entry", "activity", "exit"]
},
"ActionType": {
"type": "object",
"required": ["type", "body"],
"additionalProperties": false,
"properties": {
"type": { "$ref": "#/definitions/ActionTypeType" },
"body": { "type": "string" }
}
},
"ClassType": {
"type": "string",
"pattern": "^[a-zA-Z0-9_\\- ]*$"
},
"StateMachineType": {
"type": "object",
"additionalProperties": false,
"required": ["states"],
"properties": {
"states": {
"type": "array",
"items": {
"type": "object",
"required": ["name", "type"],
"additionalProperties": false,
"properties": {
"name": {
"description": "The name and identifier of the state. Unique within the root state machine.",
"type": "string"
},
"type": {
"description": "What kind of state (or pseudo state) this state is. E.g. 'regular' for normal states or 'initial', 'final', 'choice' etc for pseudo states. Most UML (pseudo-) states are supported.",
"$ref": "#/definitions/StateType"
},
"label": {
"description": "The display label of the state. If it's not present, most renderers will use the states' name in stead.",
"type": "string"
},
"color": {
"description": "Color to use for rendering the state. Accepts all css color names (\"blue\") and hex notation - with (\"#0000FF77\") or without (\"#0000FF\") transparency.",
"type": "string"
},
"class": {
"description": "Class name to give the state in dot and svg output.",
"$ref": "#/definitions/ClassType"
},
"active": {
"description": "If true the state is considered to be active and rendered as such.",
"type": "boolean"
},
"typeExplicitlySet": {
"description": "The default parser derives the `type` from the `name` with inband signaling. The user can override that behavior by explicitly setting the `type`. This attribute is there to express that (and make sure that on next parses & processing it doesn't get accidentily re-derived from the name again).",
"type": "boolean"
},
"isComposite": {
"description": "convenience, derived attribute - set to true if there's a state machine inside the state; false in all other cases. For internal use - @deprecated",
"type": "boolean"
},
"actions": {
"type": "array",
"description": "A series of actions and their types. The type describe when the action takes place (on entry, exit, or otherwise ('activity'))",
"items": { "$ref": "#/definitions/ActionType" }
},
"note": {
"description": "Comments related to this state. Some renderers will use the note attribute to render a note (i.e. as a post-it) attached to the state.",
"$ref": "#/definitions/NoteType"
},
"statemachine": {
"description": "state machine nested within the state.",
"$ref": "#/definitions/StateMachineType"
}
}
}
},
"transitions": {
"type": "array",
"items": {
"type": "object",
"required": ["id", "from", "to"],
"additionalProperties": false,
"properties": {
"id": {
"type": "number"
},
"from": {
"description": "The name of the state this transition transitions from",
"type": "string"
},
"to": {
"description": "The name of the state this transition transitions to",
"type": "string"
},
"label": {
"description": "A display label to represent this transition. Parsers can parse this label into events conditions and actions.",
"type": "string"
},
"event": {
"description": "Event triggering the transition",
"type": "string"
},
"cond": {
"description": "Condition for the transition to occur.",
"type": "string"
},
"action": {
"description": "Action to execute when the transition occurs.",
"type": "string"
},
"note": {
"description": "Comments related to this transition",
"$ref": "#/definitions/NoteType"
},
"color": {
"description": "Color to use for rendering the transition. Accepts all css color names (\"blue\") and hex notation - with (\"#0000FF77\") or without (\"#0000FF\") transparency.",
"type": "string"
},
"width": {
"description": "The line width to use for rendering the transition",
"type": "number",
"minimum": 0,
"maximum": 30
},
"class": {
"description": "Class name to give the state in dot and svg output.",
"$ref": "#/definitions/ClassType"
},
"type": {
"description": "Whether the transition is external (default) or internal. See https://www.w3.org/TR/scxml/#transition for details.",
"$ref": "#/definitions/TransitionType"
}
}
}
}
}
}
}
}