admin-shell-io / submodel-templates

Submodel Templates for AAS
Creative Commons Attribution 4.0 International
45 stars 16 forks source link

SMT `Asset Interfaces Description`: wrong `typeValueListElement` in `SubmodelElementList` #62

Closed zrgt closed 2 months ago

zrgt commented 7 months ago

SubmodelElementList "security" in the template violates the Constraint 108: "Constraint AASd-108: All first level child elements in a SubmodelElementList shall have the same submodel element type as specified in SubmodelElementList/typeValueListElement."

SubmodelElementList "security" has SubmodelElement as typeValueListElement, but it has a referenceElement item inside.

                            <submodelElementList>
                              <idShort>security</idShort>
                              <semanticId>
                                <type>ExternalReference</type>
                                <keys>
                                  <key>
                                    <type>GlobalReference</type>
                                    <value>https://www.w3.org/2019/wot/td#hasSecurityConfiguration</value>
                                  </key>
                                </keys>
                              </semanticId>
                              <qualifiers>
                                <qualifier>
                                  <type>Cardinality</type>
                                  <valueType>xs:string</valueType>
                                  <value>One</value>
                                </qualifier>
                              </qualifiers>
                              <typeValueListElement>SubmodelElement</typeValueListElement>
                              <value>
                                <referenceElement>
                                  <value>
                                    <type>ModelReference</type>
                                    <keys>
                                      <key>
                                        <type>Submodel</type>
                                        <value>https://example.com/ids/sm/4333_9041_7022_4184</value>
                                      </key>
                                      <key>
                                        <type>SubmodelElementCollection</type>
                                        <value>Interface</value>
                                      </key>
                                      <key>
                                        <type>SubmodelElementCollection</type>
                                        <value>EndpointMetadata</value>
                                      </key>
                                      <key>
                                        <type>SubmodelElementCollection</type>
                                        <value>securityDefinitions</value>
                                      </key>
                                      <key>
                                        <type>SubmodelElementCollection</type>
                                        <value>basic_sc</value>
                                      </key>
                                    </keys>
                                  </value>
                                </referenceElement>
                              </value>
                            </submodelElementList>
Rudra-sandeep commented 6 months ago

@sebastiankb could you please Investigate this issue?

sebastiankb commented 3 months ago

@zrgt many thanks for this hint (and sorry for my delay). You are right, the type is not correct. The correct type should be ReferenceElement as shown here:

image

@Kaz040 please can you update the template and update it on github? Would be great.

Rudra-sandeep commented 3 months ago

@sebastiankb I already update it in the aasx file and i will update it soon in github after making it compatible with newest bugfix version of specifications

Kaz040 commented 3 months ago

@sebastiankb I already update it in the aasx file and i will update it soon in github after making it compatible with newest bugfix version of specifications

Thank you @Rudra-sandeep. If I may ask, is IDTA now testing all AASX templates for already released submodel templates or you just picked this AASX file because of the issue created on it?

Rudra-sandeep commented 3 months ago

@Kaz040 No currently we are working on all the submodel templates and testing to and solving the issues to make it more compliant to specification.

Rudra-sandeep commented 3 months ago

@zrgt Thank you for raising the issue and the issue is been solved you can find the Bugfixed SMT at below link https://github.com/admin-shell-io/submodel-templates

sebastiankb commented 2 months ago

from today's AID meeting: we can close this issue since it is solved