|
64 | 64 | "title": "CORSConfig", |
65 | 65 | "type": "object" |
66 | 66 | }, |
| 67 | + "DeviceSource": { |
| 68 | + "additionalProperties": false, |
| 69 | + "properties": { |
| 70 | + "module": { |
| 71 | + "description": "Module to be imported", |
| 72 | + "title": "Module", |
| 73 | + "type": "string" |
| 74 | + }, |
| 75 | + "kind": { |
| 76 | + "const": "deviceFunctions", |
| 77 | + "default": "deviceFunctions", |
| 78 | + "title": "Kind", |
| 79 | + "type": "string" |
| 80 | + } |
| 81 | + }, |
| 82 | + "required": [ |
| 83 | + "module" |
| 84 | + ], |
| 85 | + "title": "DeviceSource", |
| 86 | + "type": "object" |
| 87 | + }, |
| 88 | + "DodalSource": { |
| 89 | + "additionalProperties": false, |
| 90 | + "properties": { |
| 91 | + "module": { |
| 92 | + "description": "Module to be imported", |
| 93 | + "title": "Module", |
| 94 | + "type": "string" |
| 95 | + }, |
| 96 | + "kind": { |
| 97 | + "const": "dodal", |
| 98 | + "default": "dodal", |
| 99 | + "title": "Kind", |
| 100 | + "type": "string" |
| 101 | + }, |
| 102 | + "mock": { |
| 103 | + "default": false, |
| 104 | + "description": "If true, ophyd_async device connections are mocked", |
| 105 | + "title": "Mock", |
| 106 | + "type": "boolean" |
| 107 | + } |
| 108 | + }, |
| 109 | + "required": [ |
| 110 | + "module" |
| 111 | + ], |
| 112 | + "title": "DodalSource", |
| 113 | + "type": "object" |
| 114 | + }, |
67 | 115 | "EnvironmentConfig": { |
68 | 116 | "additionalProperties": false, |
69 | 117 | "description": "Config for the RunEngine environment", |
70 | 118 | "properties": { |
71 | 119 | "sources": { |
72 | 120 | "default": [ |
73 | 121 | { |
74 | | - "kind": "planFunctions", |
75 | | - "module": "dodal.plans" |
| 122 | + "module": "dodal.plans", |
| 123 | + "kind": "planFunctions" |
76 | 124 | }, |
77 | 125 | { |
78 | | - "kind": "planFunctions", |
79 | | - "module": "dodal.plan_stubs.wrapped" |
| 126 | + "module": "dodal.plan_stubs.wrapped", |
| 127 | + "kind": "planFunctions" |
80 | 128 | } |
81 | 129 | ], |
82 | 130 | "items": { |
83 | | - "$ref": "#/$defs/Source" |
| 131 | + "discriminator": { |
| 132 | + "mapping": { |
| 133 | + "deviceFunctions": "#/$defs/DeviceSource", |
| 134 | + "dodal": "#/$defs/DodalSource", |
| 135 | + "planFunctions": "#/$defs/PlanSource" |
| 136 | + }, |
| 137 | + "propertyName": "kind" |
| 138 | + }, |
| 139 | + "oneOf": [ |
| 140 | + { |
| 141 | + "$ref": "#/$defs/PlanSource" |
| 142 | + }, |
| 143 | + { |
| 144 | + "$ref": "#/$defs/DeviceSource" |
| 145 | + }, |
| 146 | + { |
| 147 | + "$ref": "#/$defs/DodalSource" |
| 148 | + } |
| 149 | + ] |
84 | 150 | }, |
85 | 151 | "title": "Sources", |
86 | 152 | "type": "array" |
|
216 | 282 | "title": "OIDCConfig", |
217 | 283 | "type": "object" |
218 | 284 | }, |
| 285 | + "PlanSource": { |
| 286 | + "additionalProperties": false, |
| 287 | + "properties": { |
| 288 | + "module": { |
| 289 | + "description": "Module to be imported", |
| 290 | + "title": "Module", |
| 291 | + "type": "string" |
| 292 | + }, |
| 293 | + "kind": { |
| 294 | + "const": "planFunctions", |
| 295 | + "default": "planFunctions", |
| 296 | + "title": "Kind", |
| 297 | + "type": "string" |
| 298 | + } |
| 299 | + }, |
| 300 | + "required": [ |
| 301 | + "module" |
| 302 | + ], |
| 303 | + "title": "PlanSource", |
| 304 | + "type": "object" |
| 305 | + }, |
219 | 306 | "RestConfig": { |
220 | 307 | "additionalProperties": false, |
221 | 308 | "properties": { |
|
296 | 383 | "title": "ScratchRepository", |
297 | 384 | "type": "object" |
298 | 385 | }, |
299 | | - "Source": { |
300 | | - "additionalProperties": false, |
301 | | - "properties": { |
302 | | - "kind": { |
303 | | - "$ref": "#/$defs/SourceKind" |
304 | | - }, |
305 | | - "module": { |
306 | | - "anyOf": [ |
307 | | - { |
308 | | - "format": "path", |
309 | | - "type": "string" |
310 | | - }, |
311 | | - { |
312 | | - "type": "string" |
313 | | - } |
314 | | - ], |
315 | | - "title": "Module" |
316 | | - } |
317 | | - }, |
318 | | - "required": [ |
319 | | - "kind", |
320 | | - "module" |
321 | | - ], |
322 | | - "title": "Source", |
323 | | - "type": "object" |
324 | | - }, |
325 | | - "SourceKind": { |
326 | | - "enum": [ |
327 | | - "planFunctions", |
328 | | - "deviceFunctions", |
329 | | - "dodal" |
330 | | - ], |
331 | | - "title": "SourceKind", |
332 | | - "type": "string" |
333 | | - }, |
334 | 386 | "StompConfig": { |
335 | 387 | "additionalProperties": false, |
336 | 388 | "description": "Config for connecting to stomp broker", |
|
0 commit comments