Files
Marc Schier c71f2e7733 Fix source generator generated structures with optional fields (#3674)
Split validator load/validate; split DesignFileCollection Targets/Dependencies

ModelDesignValidator.LoadNodes now skips ValidateDictionary when a model is loaded purely as a dependency. The flag is plumbed through LoadModelDesign and LoadDesignFile; the dep loop in ValidateModel passes false, the primary target passes true. This lets callers supply unrelated or reverse dependencies (deps that import the target) without triggering premature validation failures.

DesignFileCollection exposes Targets + Dependencies; generators and tests updated. MergeNamespace preserves FilePath across PublicationDate-based replacement so later loads can still find the source file. Tester simplified to treat every other xml/csv pair as a dependency of each target.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-17 22:36:53 +02:00

19 KiB

1HeaterStatus1DataType
2HeaterStatus_EnumStrings2Variable
3Vector3DataType
4WorkOrderStatusType4DataType
5WorkOrderType5DataType
6Vector_Encoding_DefaultXml6Object
7WorkOrderStatusType_Encoding_DefaultXml7Object
8WorkOrderType_Encoding_DefaultXml8Object
9DemoModel_XmlSchema9Variable
10Seeker_Identities10Variable
11DemoModel_XmlSchema_NamespaceUri11Variable
12DemoModel_XmlSchema_Vector12Variable
13Seeker_ApplicationsExclude13Variable
14Seeker_Applications14Variable
15DemoModel_XmlSchema_WorkOrderStatusType15Variable
16Seeker_EndpointsExclude16Variable
17Seeker_Endpoints17Variable
18DemoModel_XmlSchema_WorkOrderType18Variable
19Seeker_CustomConfiguration19Variable
20Seeker_AddIdentity20Method
21Vector_Encoding_DefaultBinary21Object
22WorkOrderStatusType_Encoding_DefaultBinary22Object
23WorkOrderType_Encoding_DefaultBinary23Object
24DemoModel_BinarySchema24Variable
25Seeker_AddIdentity_InputArguments25Variable
26DemoModel_BinarySchema_NamespaceUri26Variable
27DemoModel_BinarySchema_Vector27Variable
28Seeker_RemoveIdentity28Method
29Seeker_RemoveIdentity_InputArguments29Variable
30DemoModel_BinarySchema_WorkOrderStatusType30Variable
31Seeker_AddApplication31Method
32Seeker_AddApplication_InputArguments32Variable
33DemoModel_BinarySchema_WorkOrderType33Variable
34Seeker_RemoveApplication34Method
35Seeker_RemoveApplication_InputArguments35Variable
36Signal36Unspecified
37Signal_Red37Unspecified
38Signal_Yellow38Unspecified
39Signal_Green39Unspecified
40TrafficView40Unspecified
41SampleUnion41DataType
42SampleStructureWithOptionalFields42DataType
43SampleUnionAllowSubtypes43DataType
44SampleStructureAllowSubtypes44DataType
45SampleUnion_Encoding_DefaultBinary45Object
46SampleStructureWithOptionalFields_Encoding_DefaultBinary46Object
47SampleUnionAllowSubtypes_Encoding_DefaultBinary47Object
48SampleStructureAllowSubtypes_Encoding_DefaultBinary48Object
49DemoModel_BinarySchema_Deprecated49Variable
50DemoModel_BinarySchema_SampleUnion50Variable
51Seeker_AddEndpoint51Method
52Seeker_AddEndpoint_InputArguments52Variable
53DemoModel_BinarySchema_SampleStructureWithOptionalFields53Variable
54Seeker_RemoveEndpoint54Method
55Seeker_RemoveEndpoint_InputArguments55Variable
56DemoModel_BinarySchema_SampleUnionAllowSubtypes56Variable
57RestrictedObjectType_Red_Yellow57Variable
58RestrictedObjectType_Pink_Placeholder_Yellow58Variable
59DemoModel_BinarySchema_SampleStructureAllowSubtypes59Variable
60TestObject_Red60Variable
61TestObject_Red_Yellow61Variable
62SampleUnion_Encoding_DefaultXml62Object
63SampleStructureWithOptionalFields_Encoding_DefaultXml63Object
64SampleUnionAllowSubtypes_Encoding_DefaultXml64Object
65SampleStructureAllowSubtypes_Encoding_DefaultXml65Object
66DemoModel_XmlSchema_Deprecated66Variable
67DemoModel_XmlSchema_SampleUnion67Variable
68EnumUnderscoreTest68DataType
69EnumUnderscoreTest_EnumValues69Variable
70DemoModel_XmlSchema_SampleStructureWithOptionalFields70Variable
71TestObject_Blue71Unspecified
72DemoModel_BinarySchema_DataTypeVersion72Variable
73DemoModel_XmlSchema_SampleUnionAllowSubtypes73Variable
74DemoModel_BinarySchema_Vector_DataTypeVersion74Variable
75DemoModel_BinarySchema_Vector_DictionaryFragment75Variable
76DemoModel_XmlSchema_SampleStructureAllowSubtypes76Variable
77DemoModel_BinarySchema_WorkOrderStatusType_DataTypeVersion77Variable
78DemoModel_BinarySchema_WorkOrderStatusType_DictionaryFragment78Variable
79Vector_Encoding_DefaultJson79Object
80WorkOrderStatusType_Encoding_DefaultJson80Object
81WorkOrderType_Encoding_DefaultJson81Object
82SampleUnion_Encoding_DefaultJson82Object
83SampleStructureWithOptionalFields_Encoding_DefaultJson83Object
84SampleUnionAllowSubtypes_Encoding_DefaultJson84Object
85SampleStructureAllowSubtypes_Encoding_DefaultJson85Object
86ProgramArrayType86Unspecified
87ProgramArrayType_Program87Unspecified
88ProgramArrayType_Program_Id88Unspecified
89ProgramArrayType_Program_Name89Unspecified
90ProgramType90Unspecified
91ProgramType_Id91Unspecified
92ProgramType_Name92Unspecified
93Test_Error93Object
94Test_ErrorComponent94Object
95Seeker95Object
96DemoModel_BinarySchema_WorkOrderType_DataTypeVersion96Variable
97DemoModel_BinarySchema_WorkOrderType_DictionaryFragment97Variable
98DemoModel_BinarySchema_SampleUnion_DataTypeVersion98Variable
99DemoModel_BinarySchema_SampleUnion_DictionaryFragment99Variable
100DemoModel_BinarySchema_SampleStructureWithOptionalFields_DataTypeVersion100Variable
101DemoModel_BinarySchema_SampleStructureWithOptionalFields_DictionaryFragment101Variable
102DemoModel_BinarySchema_SampleUnionAllowSubtypes_DataTypeVersion102Variable
103DemoModel_BinarySchema_SampleUnionAllowSubtypes_DictionaryFragment103Variable
104DemoModel_BinarySchema_SampleStructureAllowSubtypes_DataTypeVersion104Variable
105DemoModel_BinarySchema_SampleStructureAllowSubtypes_DictionaryFragment105Variable
106DemoModel_XmlSchema_DataTypeVersion106Variable
107DemoModel_XmlSchema_Vector_DataTypeVersion107Variable
108DemoModel_XmlSchema_Vector_DictionaryFragment108Variable
109DemoModel_XmlSchema_WorkOrderStatusType_DataTypeVersion109Variable
110DemoModel_XmlSchema_WorkOrderStatusType_DictionaryFragment110Variable
111DemoModel_XmlSchema_WorkOrderType_DataTypeVersion111Variable
112DemoModel_XmlSchema_WorkOrderType_DictionaryFragment112Variable
113DemoModel_XmlSchema_SampleUnion_DataTypeVersion113Variable
114RestrictedVariable114Unspecified
115RestrictedVariable_Yellow115Unspecified
116RestrictedObject116Unspecified
117RestrictedObject_Red117Unspecified
118RestrictedObject_Red_Yellow118Unspecified
119RestrictedObject_Blue119Unspecified
120WithTwoDimensionalVariableType120ObjectType
121WithTwoDimensionalVariableType_X121Variable
122RestrictedVariableType122VariableType
123RestrictedVariableType_Yellow123Variable
124RestrictedObjectType124ObjectType
125RestrictedObjectType_Red125Variable
126DemoModel_XmlSchema_SampleUnion_DictionaryFragment126Variable
127RestrictedObjectType_Blue127Unspecified
128TestObject128Object
129DemoModel_XmlSchema_SampleStructureWithOptionalFields_DataTypeVersion129Variable
130DemoModel_XmlSchema_SampleStructureWithOptionalFields_DictionaryFragment130Variable
131DemoModel_XmlSchema_SampleUnionAllowSubtypes_DataTypeVersion131Variable
132RestrictedObjectType_Pink_Placeholder132Variable
133DemoModel_XmlSchema_SampleUnionAllowSubtypes_DictionaryFragment133Variable
134DemoModel_XmlSchema_SampleStructureAllowSubtypes_DataTypeVersion134Variable
135DemoModel_XmlSchema_SampleStructureAllowSubtypes_DictionaryFragment135Variable
136WidgetType136Unspecified
137WidgetType_ParameterSet137Unspecified
138WidgetType_MethodSet138Unspecified
139WidgetType_GroupIdentifier139Unspecified
140WidgetType_GroupIdentifier_UIElement140Unspecified
141WidgetType_Identification141Unspecified
142WidgetType_Identification_UIElement142Unspecified
143WidgetType_Lock143Unspecified
144WidgetType_Lock_Locked144Unspecified
145WidgetType_Lock_LockingClient145Unspecified
146WidgetType_Lock_LockingUser146Unspecified
147WidgetType_Lock_RemainingLockTime147Unspecified
148WidgetType_Lock_InitLock148Unspecified
149WidgetType_Lock_InitLock_InputArguments149Unspecified
150WidgetType_Lock_InitLock_OutputArguments150Unspecified
151WidgetType_Lock_RenewLock151Unspecified
152WidgetType_Lock_RenewLock_OutputArguments152Unspecified
153WidgetType_Lock_ExitLock153Unspecified
154WidgetType_Lock_ExitLock_OutputArguments154Unspecified
155WidgetType_Lock_BreakLock155Unspecified
156WidgetType_Lock_BreakLock_OutputArguments156Unspecified
157WidgetType_Manufacturer157Unspecified
158WidgetType_ManufacturerUri158Unspecified
159WidgetType_Model159Unspecified
160WidgetType_HardwareRevision160Unspecified
161WidgetType_SoftwareRevision161Unspecified
162WidgetType_DeviceRevision162Unspecified
163WidgetType_ProductCode163Unspecified
164WidgetType_DeviceManual164Unspecified
165WidgetType_DeviceClass165Unspecified
166WidgetType_SerialNumber166Unspecified
167WidgetType_ProductInstanceUri167Unspecified
168WidgetType_RevisionCounter168Unspecified
169WidgetType_AssetId169Unspecified
170WidgetType_ComponentName170Unspecified
171WidgetType_CPIdentifier171Unspecified
172WidgetType_CPIdentifier_ParameterSet172Unspecified
173WidgetType_CPIdentifier_MethodSet173Unspecified
174WidgetType_CPIdentifier_Identification174Unspecified
175WidgetType_CPIdentifier_Identification_UIElement175Unspecified
176WidgetType_CPIdentifier_Lock176Unspecified
177WidgetType_CPIdentifier_Lock_Locked177Unspecified
178WidgetType_CPIdentifier_Lock_LockingClient178Unspecified
179WidgetType_CPIdentifier_Lock_LockingUser179Unspecified
180WidgetType_CPIdentifier_Lock_RemainingLockTime180Unspecified
181WidgetType_CPIdentifier_Lock_InitLock181Unspecified
182WidgetType_CPIdentifier_Lock_InitLock_InputArguments182Unspecified
183WidgetType_CPIdentifier_Lock_InitLock_OutputArguments183Unspecified
184WidgetType_CPIdentifier_Lock_RenewLock184Unspecified
185WidgetType_CPIdentifier_Lock_RenewLock_OutputArguments185Unspecified
186WidgetType_CPIdentifier_Lock_ExitLock186Unspecified
187WidgetType_CPIdentifier_Lock_ExitLock_OutputArguments187Unspecified
188WidgetType_CPIdentifier_Lock_BreakLock188Unspecified
189WidgetType_CPIdentifier_Lock_BreakLock_OutputArguments189Unspecified
190WidgetType_CPIdentifier_NetworkAddress190Unspecified
191WidgetType_CPIdentifier_NetworkAddress_UIElement191Unspecified
192WidgetType_DeviceHealth192Unspecified
193WidgetType_DeviceHealthAlarms193Unspecified
194WidgetType_DeviceTypeImage194Unspecified
195WidgetType_Documentation195Unspecified
196WidgetType_ProtocolSupport196Unspecified
197WidgetType_ImageSet197Unspecified
198RestrictedVariableType_[0]198Unspecified
199RestrictedVariableType_[1]199Unspecified
200RestrictedVariableType_[2]200Unspecified
201RestrictedObjectType_Red_[0]201Unspecified
202RestrictedObjectType_Red_[1]202Unspecified
203RestrictedObjectType_Red_[2]203Unspecified
204RestrictedObjectType_Pink_Placeholder_[0]204Unspecified
205RestrictedObjectType_Pink_Placeholder_[1]205Unspecified
206RestrictedObjectType_Pink_Placeholder_[2]206Unspecified
207TestObject_Red_[0]207Unspecified
208TestObject_Red_[1]208Unspecified
209TestObject_Red_[2]209Unspecified
210RestrictedVariableType_X210Variable
211RestrictedVariableType_Y211Variable
212RestrictedVariableType_Z212Variable
213RestrictedObjectType_Red_X213Variable
214RestrictedObjectType_Red_Y214Variable
215RestrictedObjectType_Red_Z215Variable
216RestrictedObjectType_Pink_Placeholder_X216Variable
217RestrictedObjectType_Pink_Placeholder_Y217Variable
218RestrictedObjectType_Pink_Placeholder_Z218Variable
219TestObject_Red_X219Variable
220TestObject_Red_Y220Variable
221TestObject_Red_Z221Variable
222Person222DataType
223Student223DataType
224Person_Encoding_DefaultBinary224Object
225Student_Encoding_DefaultBinary225Object
226DemoModel_BinarySchema_Person226Variable
227DemoModel_BinarySchema_Person_DataTypeVersion227Variable
228DemoModel_BinarySchema_Person_DictionaryFragment228Variable
229DemoModel_BinarySchema_Student229Variable
230DemoModel_BinarySchema_Student_DataTypeVersion230Variable
231DemoModel_BinarySchema_Student_DictionaryFragment231Variable
232Person_Encoding_DefaultXml232Object
233Student_Encoding_DefaultXml233Object
234DemoModel_XmlSchema_Person234Variable
235DemoModel_XmlSchema_Person_DataTypeVersion235Variable
236DemoModel_XmlSchema_Person_DictionaryFragment236Variable
237DemoModel_XmlSchema_Student237Variable
238DemoModel_XmlSchema_Student_DataTypeVersion238Variable
239DemoModel_XmlSchema_Student_DictionaryFragment239Variable
240Person_Encoding_DefaultJson240Object
241Student_Encoding_DefaultJson241Object
242DerivedStructureWithOptionalFields242Unspecified
243DerivedStructureWithOptionalFields_Encoding_DefaultBinary243Unspecified
244DemoModel_BinarySchema_DerivedStructureWithOptionalFields244Unspecified
245DemoModel_BinarySchema_DerivedStructureWithOptionalFields_DataTypeVersion245Unspecified
246DemoModel_BinarySchema_DerivedStructureWithOptionalFields_DictionaryFragment246Unspecified
247DerivedStructureWithOptionalFields_Encoding_DefaultXml247Unspecified
248DemoModel_XmlSchema_DerivedStructureWithOptionalFields248Unspecified
249DemoModel_XmlSchema_DerivedStructureWithOptionalFields_DataTypeVersion249Unspecified
250DemoModel_XmlSchema_DerivedStructureWithOptionalFields_DictionaryFragment250Unspecified
251DerivedStructureWithOptionalFields_Encoding_DefaultJson251Unspecified
252DerivedStructure1WithOptionalFields252Unspecified
253DerivedStructure2WithOptionalFields253Unspecified
254DerivedStructure1WithOptionalFields_Encoding_DefaultBinary254Unspecified
255DerivedStructure2WithOptionalFields_Encoding_DefaultBinary255Unspecified
256DemoModel_BinarySchema_DerivedStructure1WithOptionalFields256Unspecified
257DemoModel_BinarySchema_DerivedStructure1WithOptionalFields_DataTypeVersion257Unspecified
258DemoModel_BinarySchema_DerivedStructure1WithOptionalFields_DictionaryFragment258Unspecified
259DemoModel_BinarySchema_DerivedStructure2WithOptionalFields259Unspecified
260DemoModel_BinarySchema_DerivedStructure2WithOptionalFields_DataTypeVersion260Unspecified
261DemoModel_BinarySchema_DerivedStructure2WithOptionalFields_DictionaryFragment261Unspecified
262DerivedStructure1WithOptionalFields_Encoding_DefaultXml262Unspecified
263DerivedStructure2WithOptionalFields_Encoding_DefaultXml263Unspecified
264DemoModel_XmlSchema_DerivedStructure1WithOptionalFields264Unspecified
265DemoModel_XmlSchema_DerivedStructure1WithOptionalFields_DataTypeVersion265Unspecified
266DemoModel_XmlSchema_DerivedStructure1WithOptionalFields_DictionaryFragment266Unspecified
267DemoModel_XmlSchema_DerivedStructure2WithOptionalFields267Unspecified
268DemoModel_XmlSchema_DerivedStructure2WithOptionalFields_DataTypeVersion268Unspecified
269DemoModel_XmlSchema_DerivedStructure2WithOptionalFields_DictionaryFragment269Unspecified
270DerivedStructure1WithOptionalFields_Encoding_DefaultJson270Unspecified
271DerivedStructure2WithOptionalFields_Encoding_DefaultJson271Unspecified
272TestObjectType_Red272Unspecified
273TestObject_X273Unspecified
274TestObject_Y274Unspecified
275TestObject_Z275Unspecified
276TestObjectType276Unspecified
277TestObjectType_Yellow_Placeholder277Unspecified
278TestObjectType_X278Unspecified
279TestObjectType_Y279Unspecified
280TestObjectType_Z280Unspecified
281TestContainerType281Unspecified
282TestContainerType_Blue282Unspecified
283TestContainerType_Green283Unspecified
284TestContainerType_Green_Red284Unspecified
285TestContainer285Unspecified
286TestContainer_Blue286Unspecified
287TestContainer_Green287Unspecified
288TestContainer_Green_Red288Unspecified
289GenericTemperatureSensorType289Unspecified
290GenericTemperatureSensorType_Temp_Measurement290Unspecified
291GenericTemperatureSensorType_Temp_Unit291Unspecified
292GenericTemperatureSensorType_Reset_Temp292Unspecified
293GenericTemperatureSensorType_Reset_Temp_OutputArguments293Unspecified
294GenericHeaterType294Unspecified
295GenericHeaterType_Status295Unspecified
296GenericHeaterType_TurnOn_Heater296Unspecified
297GenericHeaterType_TurnOff_Heater297Unspecified
298ProximitySensorType298Unspecified
299ProximitySensorType_Proximity299Unspecified
300RoboticArmType300Unspecified
301RoboticArmType_Position301Unspecified
302RoboticArmType_Reset_Position302Unspecified
303RoboticArmType_Reset_Position_InputArguments303Unspecified
304RoboticArmType_Reset_Position_OutputArguments304Unspecified
305MyFunctionalEntity305Unspecified
306MyFunctionalEntity_TempSensor306Unspecified
307MyFunctionalEntity_TempSensor_Temp_Measurement307Unspecified
308MyFunctionalEntity_TempSensor_Temp_Unit308Unspecified
309MyFunctionalEntity_TempSensor_Reset_Temp309Unspecified
310MyFunctionalEntity_TempSensor_Reset_Temp_OutputArguments310Unspecified
311MyFunctionalEntity_Heater311Unspecified
312MyFunctionalEntity_Heater_Status312Unspecified
313MyFunctionalEntity_Heater_TurnOn_Heater313Unspecified
314MyFunctionalEntity_Heater_TurnOff_Heater314Unspecified
315MyFunctionalEntity_Proximity315Unspecified
316MyFunctionalEntity_Proximity_Proximity316Unspecified
317MyFunctionalEntity_Arm317Unspecified
318MyFunctionalEntity_Arm_Position318Unspecified
319MyFunctionalEntity_Arm_Reset_Position319Unspecified
320MyFunctionalEntity_Arm_Reset_Position_InputArguments320Unspecified
321MyFunctionalEntity_Arm_Reset_Position_OutputArguments321Unspecified
322ExtendedWorkOrderType322DataType
323ExtendedWorkOrderType_Encoding_DefaultBinary323Object
324DemoModel_BinarySchema_ExtendedWorkOrderType324Variable
325DemoModel_BinarySchema_ExtendedWorkOrderType_DataTypeVersion325Variable
326DemoModel_BinarySchema_ExtendedWorkOrderType_DictionaryFragment326Variable
327ExtendedWorkOrderType_Encoding_DefaultXml327Object
328DemoModel_XmlSchema_ExtendedWorkOrderType328Variable
329DemoModel_XmlSchema_ExtendedWorkOrderType_DataTypeVersion329Variable
330DemoModel_XmlSchema_ExtendedWorkOrderType_DictionaryFragment330Variable
331ExtendedWorkOrderType_Encoding_DefaultJson331Object
332FinalWorkOrderType332DataType
333FinalWorkOrderType_Encoding_DefaultBinary333Object
334DemoModel_BinarySchema_FinalWorkOrderType334Variable
335DemoModel_BinarySchema_FinalWorkOrderType_DataTypeVersion335Variable
336DemoModel_BinarySchema_FinalWorkOrderType_DictionaryFragment336Variable
337FinalWorkOrderType_Encoding_DefaultXml337Object
338DemoModel_XmlSchema_FinalWorkOrderType338Variable
339DemoModel_XmlSchema_FinalWorkOrderType_DataTypeVersion339Variable
340DemoModel_XmlSchema_FinalWorkOrderType_DictionaryFragment340Variable
341FinalWorkOrderType_Encoding_DefaultJson341Object
342RestrictedObjectType_BlueType342Method
343TestObject_BlueType343Method
344BlueTypeMethodType344Method
345YellowType345VariableType
346YellowType_Shade346Variable
347YellowType_DefaultInstanceBrowseName347Variable
348PictureType348ObjectType
349PictureType_YellowThing349Variable
350PictureType_YellowThing_Shade350Variable
351Picture351Object
352Picture_YellowThing352Variable
353Picture_YellowThing_Shade353Variable
354PenultimateWorkOrderType354DataType
355PenultimateWorkOrderType_Encoding_DefaultBinary355Object
356DemoModel_BinarySchema_PenultimateWorkOrderType356Variable
357DemoModel_BinarySchema_PenultimateWorkOrderType_DataTypeVersion357Variable
358DemoModel_BinarySchema_PenultimateWorkOrderType_DictionaryFragment358Variable
359PenultimateWorkOrderType_Encoding_DefaultXml359Object
360DemoModel_XmlSchema_PenultimateWorkOrderType360Variable
361DemoModel_XmlSchema_PenultimateWorkOrderType_DataTypeVersion361Variable
362DemoModel_XmlSchema_PenultimateWorkOrderType_DictionaryFragment362Variable
363PenultimateWorkOrderType_Encoding_DefaultJson363Object
364BrightnessType364ObjectType
365BrightnessType_Amber_Placeholder365Object
366BrightnessType_Amber_Placeholder_StateNumber366Variable
367BrightnessType_Green_Placeholder367Object
368BrightnessType_Green_Placeholder_CurrentState368Variable
369BrightnessType_Green_Placeholder_CurrentState_Id369Variable
370BrightnessType_Green_Placeholder_CurrentState_Name370Variable
371BrightnessType_Green_Placeholder_CurrentState_Number371Variable
372BrightnessType_Green_Placeholder_CurrentState_EffectiveDisplayName372Variable
373BrightnessType_Green_Placeholder_LastTransition373Variable
374BrightnessType_Green_Placeholder_LastTransition_Id374Variable
375BrightnessType_Green_Placeholder_LastTransition_Name375Variable
376BrightnessType_Green_Placeholder_LastTransition_Number376Variable
377BrightnessType_Green_Placeholder_LastTransition_TransitionTime377Variable
378BrightnessType_Green_Placeholder_LastTransition_EffectiveTransitionTime378Variable
379PictureType_Indigo_Placeholder380Object