forked from serverlessworkflow/specification
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathevents.json
117 lines (117 loc) · 3.06 KB
/
events.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
{
"$id": "https://serverlessworkflow.io/schemas/0.8/events.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Serverless Workflow specification - events schema",
"type": "object",
"events": {
"oneOf": [
{
"type": "string",
"format": "uri",
"description": "URI to a resource containing event definitions (json or yaml)"
},
{
"type": "array",
"description": "Workflow CloudEvent definitions. Defines CloudEvents that can be consumed or produced",
"items": {
"type": "object",
"$ref": "#/definitions/eventdef"
},
"additionalItems": false,
"minItems": 1
}
]
},
"required": [
"events"
],
"definitions": {
"eventdef": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Unique event name",
"minLength": 1
},
"source": {
"type": "string",
"description": "CloudEvent source"
},
"type": {
"type": "string",
"description": "CloudEvent type"
},
"kind": {
"type": "string",
"enum": [
"consumed",
"produced"
],
"description": "Defines the CloudEvent as either 'consumed' or 'produced' by the workflow. Default is 'consumed'",
"default": "consumed"
},
"correlation": {
"type": "array",
"description": "CloudEvent correlation definitions",
"minItems": 1,
"items": {
"type": "object",
"$ref": "#/definitions/correlationDef"
},
"additionalItems": false
},
"dataOnly": {
"type": "boolean",
"default": true,
"description": "If `true`, only the Event payload is accessible to consuming Workflow states. If `false`, both event payload and context attributes should be accessible "
},
"metadata": {
"$ref": "common.json#/definitions/metadata",
"description": "Metadata information"
}
},
"additionalProperties": false,
"if": {
"properties": {
"kind": {
"const": "consumed"
}
}
},
"then": {
"required": [
"name",
"source",
"type"
]
},
"else": {
"required": [
"name",
"type"
]
}
},
"correlationDef": {
"type": "object",
"description": "CloudEvent correlation definition",
"properties": {
"contextAttributeName": {
"type": "string",
"description": "CloudEvent Extension Context Attribute name",
"minLength": 1
},
"contextAttributeValue": {
"type": "string",
"description": "CloudEvent Extension Context Attribute value",
"minLength": 1
}
},
"additionalProperties": false,
"required": [
"contextAttributeName"
]
}
}
}