Azure / opendigitaltwins-dtdl

Digital Twins Definition Language
Creative Commons Attribution 4.0 International
473 stars 161 forks source link

Expanding max limits on the depth of inheritance of Models in the DTDL v3 Spec #179

Open joebeernink opened 8 months ago

joebeernink commented 8 months ago

Currently, the DTDL V3 Spec limits the maximum depth of inheritance to 10 levels. Would it be possible to expand this limit to 12 or more?

jrdouceur commented 8 months ago

Not in V3, I'm afraid, but we can consider this increase in a future DTDL version. Do you have a particular use case that can help us justify a depth of 12?

rido-min commented 8 months ago

Thanks @joebeernink for submitting this issue,

As this request implies to rev the DTDL v3 spec, we'd like to understand your use case, and which DTDL compatible services will need to be updated.

Before accepting this proposal, we need to think about compatibility with current DTDL version, although this does not seem a breaking change imho.

@jrdouceur might have more insights.

wroantree-willow commented 8 months ago

This is one example that we had recently, that we had to flatten to fit into the 10 level limit:

dtmi:com:willowinc:Capability;1 dtmi:com:willowinc:Parameter;1 dtmi:com:willowinc:Setpoint;1 dtmi:com:willowinc:StateSetpoint;1 dtmi:com:willowinc:BinarySetpoint;1 dtmi:com:willowinc:AlarmSetpoint;1 dtmi:com:willowinc:TemperatureAlarmSetpoint;1 dtmi:com:willowinc:HighTemperatureAlarmSetpoint;1 dtmi:com:willowinc:HighWaterTemperatureAlarmSetpoint;1 dtmi:com:willowinc:HighEnteringWaterTemperatureAlarmSetpoint;1 dtmi:com:willowinc:HighCoilEnteringWaterTemperatureAlarmSetpoint;1 dtmi:com:willowinc:HighChilledWaterCoilEnteringWaterTemperatureAlarmSetpoint;1

We had to flatten about 60 models to fit into the 10 level limit. 12 levels would be good, but 15 levels would give us additional room for the future. Thanks.