Skip to content

Commit 7f76b24

Browse files
Add aio wasm graph schema 1.1.0 (#5416)
* Add aio wasm graph schema 1.1.0 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix validation --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent d2ca59d commit 7f76b24

3 files changed

Lines changed: 251 additions & 2 deletions

File tree

src/api/json/catalog.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9212,9 +9212,10 @@
92129212
{
92139213
"name": "Azure IoT Operations Wasm Graph Config",
92149214
"description": "",
9215-
"url": "https://www.schemastore.org/aio-wasm-graph-config-1.0.0.json",
9215+
"url": "https://www.schemastore.org/aio-wasm-graph-config-1.1.0.json",
92169216
"versions": {
9217-
"1.0.0": "https://www.schemastore.org/aio-wasm-graph-config-1.0.0.json"
9217+
"1.0.0": "https://www.schemastore.org/aio-wasm-graph-config-1.0.0.json",
9218+
"1.1.0": "https://www.schemastore.org/aio-wasm-graph-config-1.1.0.json"
92189219
}
92199220
},
92209221
{

src/schema-validation.jsonc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,9 @@
706706
"apibuilder.json": {
707707
"externalSchema": ["base-04.json"]
708708
},
709+
"aio-wasm-graph-config-1.1.0.json": {
710+
"unknownFormat": ["uint32"]
711+
},
709712
"apollo-router-2.8.1.json": {
710713
"externalSchema": ["base.json"],
711714
"unknownFormat": ["uint", "uint32", "uint64"]
Lines changed: 245 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,245 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://www.schemastore.org/aio-wasm-graph-config-1.1.0.json",
4+
"title": "Azure IoT Operations Wasm Graph Config",
5+
"type": "object",
6+
"required": ["connections", "metadata", "moduleRequirements", "operations"],
7+
"properties": {
8+
"connections": {
9+
"type": "array",
10+
"items": {
11+
"$ref": "#/definitions/WasmGraphConfigConnection"
12+
}
13+
},
14+
"metadata": {
15+
"$ref": "#/definitions/WasmGraphMetadata"
16+
},
17+
"moduleConfigurations": {
18+
"default": [],
19+
"type": "array",
20+
"items": {
21+
"$ref": "#/definitions/ModuleConfiguration"
22+
}
23+
},
24+
"moduleRequirements": {
25+
"$ref": "#/definitions/ModuleVersions"
26+
},
27+
"operations": {
28+
"type": "array",
29+
"items": {
30+
"$ref": "#/definitions/WasmGraphConfigModule"
31+
}
32+
},
33+
"schemas": {
34+
"default": [],
35+
"type": "array",
36+
"items": {
37+
"$ref": "#/definitions/SchemaConfiguration"
38+
}
39+
}
40+
},
41+
"additionalProperties": false,
42+
"definitions": {
43+
"Arity": {
44+
"oneOf": [
45+
{
46+
"type": "integer",
47+
"format": "uint32",
48+
"minimum": 1
49+
},
50+
{
51+
"const": "unbounded"
52+
}
53+
],
54+
"default": 1
55+
},
56+
"BranchOutputArm": {
57+
"type": "string",
58+
"enum": ["False", "True"]
59+
},
60+
"ConfigParameters": {
61+
"type": "object",
62+
"required": ["name"],
63+
"properties": {
64+
"default": {
65+
"type": ["string", "null"]
66+
},
67+
"description": {
68+
"type": ["string", "null"]
69+
},
70+
"name": {
71+
"type": "string"
72+
},
73+
"required": {
74+
"default": false,
75+
"type": "boolean"
76+
},
77+
"schema": {
78+
"type": ["string", "null"]
79+
}
80+
}
81+
},
82+
"ModuleConfiguration": {
83+
"type": "object",
84+
"required": ["name", "parameters"],
85+
"properties": {
86+
"name": {
87+
"type": "string"
88+
},
89+
"parameters": {
90+
"type": "object",
91+
"additionalProperties": {
92+
"$ref": "#/definitions/ConfigParameters"
93+
}
94+
}
95+
}
96+
},
97+
"ModuleVersionFeature": {
98+
"type": "object",
99+
"required": ["name"],
100+
"properties": {
101+
"name": {
102+
"type": "string"
103+
},
104+
"value": {
105+
"type": ["string", "null"]
106+
}
107+
},
108+
"additionalProperties": false
109+
},
110+
"ModuleVersions": {
111+
"type": "object",
112+
"required": ["apiVersion", "runtimeVersion"],
113+
"properties": {
114+
"apiVersion": {
115+
"type": "string"
116+
},
117+
"features": {
118+
"type": ["array", "null"],
119+
"items": {
120+
"$ref": "#/definitions/ModuleVersionFeature"
121+
}
122+
},
123+
"runtimeVersion": {
124+
"type": "string"
125+
}
126+
},
127+
"additionalProperties": false
128+
},
129+
"SchemaConfiguration": {
130+
"type": "object",
131+
"required": ["format", "name", "schema"],
132+
"properties": {
133+
"format": {
134+
"type": "string"
135+
},
136+
"name": {
137+
"type": "string"
138+
},
139+
"schema": {
140+
"type": "string"
141+
}
142+
}
143+
},
144+
"WasmGraphConfigConnection": {
145+
"type": "object",
146+
"required": ["from", "to"],
147+
"properties": {
148+
"from": {
149+
"$ref": "#/definitions/WasmGraphConfigConnectionFromPoint"
150+
},
151+
"to": {
152+
"$ref": "#/definitions/WasmGraphConfigConnectionToPoint"
153+
}
154+
},
155+
"additionalProperties": false
156+
},
157+
"WasmGraphConfigConnectionFromPoint": {
158+
"type": "object",
159+
"required": ["name"],
160+
"properties": {
161+
"arm": {
162+
"anyOf": [
163+
{
164+
"$ref": "#/definitions/BranchOutputArm"
165+
},
166+
{
167+
"type": "null"
168+
}
169+
]
170+
},
171+
"name": {
172+
"type": "string"
173+
},
174+
"schemaName": {
175+
"type": ["string", "null"]
176+
}
177+
},
178+
"additionalProperties": false
179+
},
180+
"WasmGraphConfigConnectionOperator": {
181+
"type": "string",
182+
"enum": [
183+
"source",
184+
"map",
185+
"filter",
186+
"branch",
187+
"concatenate",
188+
"accumulate",
189+
"delay",
190+
"sink"
191+
]
192+
},
193+
"WasmGraphConfigConnectionToPoint": {
194+
"type": "object",
195+
"required": ["name"],
196+
"properties": {
197+
"name": {
198+
"type": "string"
199+
}
200+
},
201+
"additionalProperties": false
202+
},
203+
"WasmGraphConfigModule": {
204+
"type": "object",
205+
"required": ["name", "operationType"],
206+
"properties": {
207+
"arity": {
208+
"$ref": "#/definitions/Arity"
209+
},
210+
"module": {
211+
"type": ["string", "null"]
212+
},
213+
"name": {
214+
"type": "string"
215+
},
216+
"operationType": {
217+
"$ref": "#/definitions/WasmGraphConfigConnectionOperator"
218+
}
219+
},
220+
"additionalProperties": false
221+
},
222+
"WasmGraphMetadata": {
223+
"type": "object",
224+
"required": ["$schema", "name", "version"],
225+
"properties": {
226+
"$schema": {
227+
"type": "string"
228+
},
229+
"description": {
230+
"type": ["string", "null"]
231+
},
232+
"name": {
233+
"type": "string"
234+
},
235+
"vendor": {
236+
"type": ["string", "null"]
237+
},
238+
"version": {
239+
"type": "string"
240+
}
241+
},
242+
"additionalProperties": false
243+
}
244+
}
245+
}

0 commit comments

Comments
 (0)