Skip to content

Commit d281438

Browse files
committed
- Minor fixes
- Added unit tests
1 parent 9cc065a commit d281438

File tree

76 files changed

+1808
-254
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+1808
-254
lines changed
Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
{
2+
"$defs": {
3+
"workflow": {
4+
"properties": {
5+
"states": {
6+
"items": {
7+
"anyOf": [
8+
{
9+
"title": "Sleep State",
10+
"$ref": "#/definitions/sleepstate"
11+
},
12+
{
13+
"title": "Event State",
14+
"$ref": "#/definitions/eventstate"
15+
},
16+
{
17+
"title": "Operation State",
18+
"$ref": "#/definitions/operationstate"
19+
},
20+
{
21+
"title": "Parallel State",
22+
"$ref": "#/definitions/parallelstate"
23+
},
24+
{
25+
"title": "Switch State",
26+
"$ref": "#/definitions/switchstate"
27+
},
28+
{
29+
"title": "Inject State",
30+
"$ref": "#/definitions/injectstate"
31+
},
32+
{
33+
"title": "ForEach State",
34+
"$ref": "#/definitions/foreachstate"
35+
},
36+
{
37+
"title": "Callback State",
38+
"$ref": "#/definitions/callbackstate"
39+
},
40+
{
41+
"title": "Condition State",
42+
"$ref": "#/definitions/conditionState"
43+
}
44+
]
45+
}
46+
}
47+
},
48+
"definitions": {
49+
"conditionState": {
50+
"type": "object",
51+
"description": "Enables the use of a ternary",
52+
"properties": {
53+
"id": {
54+
"type": "string",
55+
"description": "Unique State id",
56+
"minLength": 1
57+
},
58+
"name": {
59+
"type": "string",
60+
"description": "State name"
61+
},
62+
"type": {
63+
"type": "string",
64+
"const": "condition",
65+
"description": "State type"
66+
},
67+
"end": {
68+
"$ref": "#/definitions/end",
69+
"description": "State end definition"
70+
},
71+
"stateDataFilter": {
72+
"description": "State data filter",
73+
"$ref": "#/definitions/statedatafilter"
74+
},
75+
"if": {
76+
"type": "object",
77+
"properties": {
78+
"condition": {
79+
"type": "string"
80+
},
81+
"action": {
82+
"$ref": "#/definitions/action"
83+
}
84+
},
85+
"required": [ "condition", "action" ]
86+
},
87+
"else": {
88+
"type": "object",
89+
"properties": {
90+
"action": {
91+
"$ref": "#/definitions/action"
92+
}
93+
},
94+
"required": [ "action" ]
95+
},
96+
"timeouts": {
97+
"type": "object",
98+
"description": "State specific timeouts",
99+
"properties": {
100+
"stateExecTimeout": {
101+
"$ref": "timeouts.json#/definitions/stateExecTimeout"
102+
}
103+
},
104+
"required": []
105+
},
106+
"onErrors": {
107+
"type": "array",
108+
"description": "States error handling definitions",
109+
"items": {
110+
"type": "object",
111+
"$ref": "#/definitions/error"
112+
},
113+
"additionalItems": false
114+
},
115+
"transition": {
116+
"description": "Next transition of the workflow after the workflow sleep",
117+
"$ref": "#/definitions/transition"
118+
},
119+
"compensatedBy": {
120+
"type": "string",
121+
"minLength": 1,
122+
"description": "Unique Name of a workflow state which is responsible for compensation of this state"
123+
},
124+
"usedForCompensation": {
125+
"type": "boolean",
126+
"default": false,
127+
"description": "If true, this state is used to compensate another state. Default is false"
128+
},
129+
"metadata": {
130+
"$ref": "common.json#/definitions/metadata"
131+
}
132+
},
133+
"additionalProperties": false,
134+
"if": {
135+
"properties": {
136+
"usedForCompensation": {
137+
"const": true
138+
}
139+
},
140+
"required": [
141+
"usedForCompensation"
142+
]
143+
},
144+
"then": {
145+
"required": [
146+
"name",
147+
"type",
148+
"if"
149+
]
150+
},
151+
"else": {
152+
"oneOf": [
153+
{
154+
"required": [
155+
"name",
156+
"type",
157+
"if",
158+
"end"
159+
]
160+
},
161+
{
162+
"required": [
163+
"name",
164+
"type",
165+
"if",
166+
"transition"
167+
]
168+
}
169+
]
170+
}
171+
}
172+
}
173+
}
174+
}
175+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"$defs": {
3+
"functions": {
4+
"definitions": {
5+
"function": {
6+
"type": "object",
7+
"properties": {
8+
"type": {
9+
"type": "string",
10+
"description": "Defines the function type. Is either `rest`, `asyncapi, `rpc`, `graphql`, `odata`, `expression` or `greet`. Default is `rest`",
11+
"enum": [
12+
"rest",
13+
"asyncapi",
14+
"rpc",
15+
"graphql",
16+
"odata",
17+
"expression",
18+
"custom",
19+
"greet"
20+
],
21+
"default": "rest"
22+
}
23+
}
24+
}
25+
}
26+
}
27+
}
28+
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy