diff --git a/source/AAS.TwinEngine.DataEngine.sln b/source/AAS.TwinEngine.DataEngine.sln index b56b843..00a67ac 100644 --- a/source/AAS.TwinEngine.DataEngine.sln +++ b/source/AAS.TwinEngine.DataEngine.sln @@ -13,32 +13,90 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AAS.TwinEngine.Plugin.TestP EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AAS.TwinEngine.Plugin.TestPlugin.UnitTests", "AAS.TwinEngine.Plugin.TestPlugin.UnitTests\AAS.TwinEngine.Plugin.TestPlugin.UnitTests.csproj", "{573F3A2B-8CC3-40D8-B543-74BF5DF7D4FF}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests", "AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests\AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests.csproj", "{147F5F77-EC38-4541-AF3C-5B4FAD15E1C4}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {80387870-5B50-461A-B5E7-105B9D526F7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {80387870-5B50-461A-B5E7-105B9D526F7B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {80387870-5B50-461A-B5E7-105B9D526F7B}.Debug|x64.ActiveCfg = Debug|Any CPU + {80387870-5B50-461A-B5E7-105B9D526F7B}.Debug|x64.Build.0 = Debug|Any CPU + {80387870-5B50-461A-B5E7-105B9D526F7B}.Debug|x86.ActiveCfg = Debug|Any CPU + {80387870-5B50-461A-B5E7-105B9D526F7B}.Debug|x86.Build.0 = Debug|Any CPU {80387870-5B50-461A-B5E7-105B9D526F7B}.Release|Any CPU.ActiveCfg = Release|Any CPU {80387870-5B50-461A-B5E7-105B9D526F7B}.Release|Any CPU.Build.0 = Release|Any CPU + {80387870-5B50-461A-B5E7-105B9D526F7B}.Release|x64.ActiveCfg = Release|Any CPU + {80387870-5B50-461A-B5E7-105B9D526F7B}.Release|x64.Build.0 = Release|Any CPU + {80387870-5B50-461A-B5E7-105B9D526F7B}.Release|x86.ActiveCfg = Release|Any CPU + {80387870-5B50-461A-B5E7-105B9D526F7B}.Release|x86.Build.0 = Release|Any CPU {B24F4A6D-294A-4C4A-BAAC-A2D396E8C88A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B24F4A6D-294A-4C4A-BAAC-A2D396E8C88A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B24F4A6D-294A-4C4A-BAAC-A2D396E8C88A}.Debug|x64.ActiveCfg = Debug|Any CPU + {B24F4A6D-294A-4C4A-BAAC-A2D396E8C88A}.Debug|x64.Build.0 = Debug|Any CPU + {B24F4A6D-294A-4C4A-BAAC-A2D396E8C88A}.Debug|x86.ActiveCfg = Debug|Any CPU + {B24F4A6D-294A-4C4A-BAAC-A2D396E8C88A}.Debug|x86.Build.0 = Debug|Any CPU {B24F4A6D-294A-4C4A-BAAC-A2D396E8C88A}.Release|Any CPU.ActiveCfg = Release|Any CPU {B24F4A6D-294A-4C4A-BAAC-A2D396E8C88A}.Release|Any CPU.Build.0 = Release|Any CPU + {B24F4A6D-294A-4C4A-BAAC-A2D396E8C88A}.Release|x64.ActiveCfg = Release|Any CPU + {B24F4A6D-294A-4C4A-BAAC-A2D396E8C88A}.Release|x64.Build.0 = Release|Any CPU + {B24F4A6D-294A-4C4A-BAAC-A2D396E8C88A}.Release|x86.ActiveCfg = Release|Any CPU + {B24F4A6D-294A-4C4A-BAAC-A2D396E8C88A}.Release|x86.Build.0 = Release|Any CPU {D16C8CF8-6A29-4A40-971A-9A070A1817A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D16C8CF8-6A29-4A40-971A-9A070A1817A9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D16C8CF8-6A29-4A40-971A-9A070A1817A9}.Debug|x64.ActiveCfg = Debug|Any CPU + {D16C8CF8-6A29-4A40-971A-9A070A1817A9}.Debug|x64.Build.0 = Debug|Any CPU + {D16C8CF8-6A29-4A40-971A-9A070A1817A9}.Debug|x86.ActiveCfg = Debug|Any CPU + {D16C8CF8-6A29-4A40-971A-9A070A1817A9}.Debug|x86.Build.0 = Debug|Any CPU {D16C8CF8-6A29-4A40-971A-9A070A1817A9}.Release|Any CPU.ActiveCfg = Release|Any CPU {D16C8CF8-6A29-4A40-971A-9A070A1817A9}.Release|Any CPU.Build.0 = Release|Any CPU + {D16C8CF8-6A29-4A40-971A-9A070A1817A9}.Release|x64.ActiveCfg = Release|Any CPU + {D16C8CF8-6A29-4A40-971A-9A070A1817A9}.Release|x64.Build.0 = Release|Any CPU + {D16C8CF8-6A29-4A40-971A-9A070A1817A9}.Release|x86.ActiveCfg = Release|Any CPU + {D16C8CF8-6A29-4A40-971A-9A070A1817A9}.Release|x86.Build.0 = Release|Any CPU {455B960D-57D0-4D9B-805C-E1DEA05B9311}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {455B960D-57D0-4D9B-805C-E1DEA05B9311}.Debug|Any CPU.Build.0 = Debug|Any CPU + {455B960D-57D0-4D9B-805C-E1DEA05B9311}.Debug|x64.ActiveCfg = Debug|Any CPU + {455B960D-57D0-4D9B-805C-E1DEA05B9311}.Debug|x64.Build.0 = Debug|Any CPU + {455B960D-57D0-4D9B-805C-E1DEA05B9311}.Debug|x86.ActiveCfg = Debug|Any CPU + {455B960D-57D0-4D9B-805C-E1DEA05B9311}.Debug|x86.Build.0 = Debug|Any CPU {455B960D-57D0-4D9B-805C-E1DEA05B9311}.Release|Any CPU.ActiveCfg = Release|Any CPU {455B960D-57D0-4D9B-805C-E1DEA05B9311}.Release|Any CPU.Build.0 = Release|Any CPU + {455B960D-57D0-4D9B-805C-E1DEA05B9311}.Release|x64.ActiveCfg = Release|Any CPU + {455B960D-57D0-4D9B-805C-E1DEA05B9311}.Release|x64.Build.0 = Release|Any CPU + {455B960D-57D0-4D9B-805C-E1DEA05B9311}.Release|x86.ActiveCfg = Release|Any CPU + {455B960D-57D0-4D9B-805C-E1DEA05B9311}.Release|x86.Build.0 = Release|Any CPU {573F3A2B-8CC3-40D8-B543-74BF5DF7D4FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {573F3A2B-8CC3-40D8-B543-74BF5DF7D4FF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {573F3A2B-8CC3-40D8-B543-74BF5DF7D4FF}.Debug|x64.ActiveCfg = Debug|Any CPU + {573F3A2B-8CC3-40D8-B543-74BF5DF7D4FF}.Debug|x64.Build.0 = Debug|Any CPU + {573F3A2B-8CC3-40D8-B543-74BF5DF7D4FF}.Debug|x86.ActiveCfg = Debug|Any CPU + {573F3A2B-8CC3-40D8-B543-74BF5DF7D4FF}.Debug|x86.Build.0 = Debug|Any CPU {573F3A2B-8CC3-40D8-B543-74BF5DF7D4FF}.Release|Any CPU.ActiveCfg = Release|Any CPU {573F3A2B-8CC3-40D8-B543-74BF5DF7D4FF}.Release|Any CPU.Build.0 = Release|Any CPU + {573F3A2B-8CC3-40D8-B543-74BF5DF7D4FF}.Release|x64.ActiveCfg = Release|Any CPU + {573F3A2B-8CC3-40D8-B543-74BF5DF7D4FF}.Release|x64.Build.0 = Release|Any CPU + {573F3A2B-8CC3-40D8-B543-74BF5DF7D4FF}.Release|x86.ActiveCfg = Release|Any CPU + {573F3A2B-8CC3-40D8-B543-74BF5DF7D4FF}.Release|x86.Build.0 = Release|Any CPU + {147F5F77-EC38-4541-AF3C-5B4FAD15E1C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {147F5F77-EC38-4541-AF3C-5B4FAD15E1C4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {147F5F77-EC38-4541-AF3C-5B4FAD15E1C4}.Debug|x64.ActiveCfg = Debug|Any CPU + {147F5F77-EC38-4541-AF3C-5B4FAD15E1C4}.Debug|x64.Build.0 = Debug|Any CPU + {147F5F77-EC38-4541-AF3C-5B4FAD15E1C4}.Debug|x86.ActiveCfg = Debug|Any CPU + {147F5F77-EC38-4541-AF3C-5B4FAD15E1C4}.Debug|x86.Build.0 = Debug|Any CPU + {147F5F77-EC38-4541-AF3C-5B4FAD15E1C4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {147F5F77-EC38-4541-AF3C-5B4FAD15E1C4}.Release|Any CPU.Build.0 = Release|Any CPU + {147F5F77-EC38-4541-AF3C-5B4FAD15E1C4}.Release|x64.ActiveCfg = Release|Any CPU + {147F5F77-EC38-4541-AF3C-5B4FAD15E1C4}.Release|x64.Build.0 = Release|Any CPU + {147F5F77-EC38-4541-AF3C-5B4FAD15E1C4}.Release|x86.ActiveCfg = Release|Any CPU + {147F5F77-EC38-4541-AF3C-5B4FAD15E1C4}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests.csproj b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests.csproj new file mode 100644 index 0000000..eb590b7 --- /dev/null +++ b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests.csproj @@ -0,0 +1,75 @@ + + + + net8.0 + enable + enable + + false + true + true + IDE1006, IDE0058 + + + + + + + + + + + + + + + + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + + diff --git a/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/AasRegistry/AasRegistryTests.cs b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/AasRegistry/AasRegistryTests.cs new file mode 100644 index 0000000..eab3827 --- /dev/null +++ b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/AasRegistry/AasRegistryTests.cs @@ -0,0 +1,87 @@ +using System.Text.Json; + +namespace AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests.AasRegistry; + +/// +/// Tests for AAS Registry endpoints +/// +public class AasRegistryTests : ApiTestBase +{ + [Fact] + public async Task GetAllShellDescriptors_ShouldReturnSuccess_ContentAsExpected() + { + // Arrange + var url = "/shell-descriptors"; + + // Act + var response = await ApiContext.GetAsync(url); + + // Assert + AssertSuccessResponse(response); + var content = await response.TextAsync(); + Assert.False(string.IsNullOrEmpty(content)); + + var json = JsonDocument.Parse(content); + Assert.NotNull(json); + + await CompareJsonAsync(json, Path.Combine(Directory.GetCurrentDirectory(), "AasRegistry", "TestData", "GetAllShellDescriptors_Expected.json")); + } + + [Fact] + public async Task GetAllShellDescriptors_WithPagination() + { + // Arrange + var urlLimit2 = "/shell-descriptors?limit=2"; + var urlLimit3 = "/shell-descriptors?limit=3"; + + // Act + + var responseLimit2 = await ApiContext.GetAsync(urlLimit2); + var responseLimit3 = await ApiContext.GetAsync(urlLimit3); + + // Assert + AssertSuccessResponse(responseLimit2); + AssertSuccessResponse(responseLimit3); + + var contentLimit2 = await responseLimit2.TextAsync(); + var contentLimit3 = await responseLimit3.TextAsync(); + + Assert.False(string.IsNullOrEmpty(contentLimit2)); + Assert.False(string.IsNullOrEmpty(contentLimit3)); + + var jsonLimit2 = JsonDocument.Parse(contentLimit2); + var jsonLimit3 = JsonDocument.Parse(contentLimit3); + + Assert.NotNull(jsonLimit2); + Assert.NotNull(jsonLimit3); + + // Verify that limit 3 contains one more element than limit 2 + var resultLimit2 = jsonLimit2.RootElement.GetProperty("result"); + var resultLimit3 = jsonLimit3.RootElement.GetProperty("result"); + + var countLimit2 = resultLimit2.GetArrayLength(); + var countLimit3 = resultLimit3.GetArrayLength(); + + Assert.Equal(countLimit2 + 1, countLimit3); + } + + [Fact] + public async Task GetShellDescriptorById_ShouldReturnSuccess_ContentAsExpected() + { + // Arrange + var url = $"/shell-descriptors/{AasIdentifier}"; + + // Act + var response = await ApiContext.GetAsync(url); + + // Assert + AssertSuccessResponse(response); + var content = await response.TextAsync(); + Assert.False(string.IsNullOrEmpty(content)); + + var actualDoc = JsonDocument.Parse(content); + Assert.NotNull(actualDoc); + + await CompareJsonAsync(actualDoc, Path.Combine(Directory.GetCurrentDirectory(), "AasRegistry", "TestData", "GetShellDescriptorById_Expected.json")); + } +} diff --git a/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/AasRegistry/TestData/GetAllShellDescriptors_Expected.json b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/AasRegistry/TestData/GetAllShellDescriptors_Expected.json new file mode 100644 index 0000000..842cacf --- /dev/null +++ b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/AasRegistry/TestData/GetAllShellDescriptors_Expected.json @@ -0,0 +1,88 @@ +{ + "paging_metadata": { + "cursor": null + }, + "result": [ + { + "description": null, + "displayName": null, + "extensions": null, + "administration": null, + "assetKind": 0, + "assetType": 0, + "endpoints": [ + { + "interface": "AAS-3.0", + "protocolInformation": { + "href": "http://localhost:8080/shells/aHR0cHM6Ly9tbS1zb2Z0d2FyZS5jb20vaWRzL2Fhcy8wMDAtMDAx", + "endpointProtocol": "http", + "endpointProtocolVersion": null, + "subprotocol": null, + "subprotocolBody": null, + "subprotocolBodyEncoding": null, + "securityAttributes": null + } + } + ], + "globalAssetId": "https://mm-software.com/ids/assets/000-001", + "idShort": "M&M01", + "id": "https://mm-software.com/ids/aas/000-001", + "specificAssetIds": [], + "submodelDescriptors": null + }, + { + "description": null, + "displayName": null, + "extensions": null, + "administration": null, + "assetKind": 0, + "assetType": 0, + "endpoints": [ + { + "interface": "AAS-3.0", + "protocolInformation": { + "href": "http://localhost:8080/shells/aHR0cHM6Ly9tbS1zb2Z0d2FyZS5jb20vaWRzL2Fhcy8wMDAtMDAy", + "endpointProtocol": "http", + "endpointProtocolVersion": null, + "subprotocol": null, + "subprotocolBody": null, + "subprotocolBodyEncoding": null, + "securityAttributes": null + } + } + ], + "globalAssetId": "https://mm-software.com/ids/assets/000-002", + "idShort": "M&M02", + "id": "https://mm-software.com/ids/aas/000-002", + "specificAssetIds": [], + "submodelDescriptors": null + }, + { + "description": null, + "displayName": null, + "extensions": null, + "administration": null, + "assetKind": 0, + "assetType": 0, + "endpoints": [ + { + "interface": "AAS-3.0", + "protocolInformation": { + "href": "http://localhost:8080/shells/aHR0cHM6Ly9tbS1zb2Z0d2FyZS5jb20vaWRzL2Fhcy8wMDAtMDAz", + "endpointProtocol": "http", + "endpointProtocolVersion": null, + "subprotocol": null, + "subprotocolBody": null, + "subprotocolBodyEncoding": null, + "securityAttributes": null + } + } + ], + "globalAssetId": "https://mm-software.com/ids/assets/000-003", + "idShort": "M&M03", + "id": "https://mm-software.com/ids/aas/000-003", + "specificAssetIds": [], + "submodelDescriptors": null + } + ] +} diff --git a/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/AasRegistry/TestData/GetShellDescriptorById_Expected.json b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/AasRegistry/TestData/GetShellDescriptorById_Expected.json new file mode 100644 index 0000000..b740827 --- /dev/null +++ b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/AasRegistry/TestData/GetShellDescriptorById_Expected.json @@ -0,0 +1,27 @@ +{ + "description": null, + "displayName": null, + "extensions": null, + "administration": null, + "assetKind": 0, + "assetType": 0, + "endpoints": [ + { + "interface": "AAS-3.0", + "protocolInformation": { + "href": "http://localhost:8080/shells/aHR0cHM6Ly9tbS1zb2Z0d2FyZS5jb20vaWRzL2Fhcy8wMDAtMDAx", + "endpointProtocol": "http", + "endpointProtocolVersion": null, + "subprotocol": null, + "subprotocolBody": null, + "subprotocolBodyEncoding": null, + "securityAttributes": null + } + } + ], + "globalAssetId": "https://mm-software.com/ids/assets/000-001", + "idShort": "M&M01", + "id": "https://mm-software.com/ids/aas/000-001", + "specificAssetIds": [], + "submodelDescriptors": null +} diff --git a/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/AasRepository/AasRepositoryTests.cs b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/AasRepository/AasRepositoryTests.cs new file mode 100644 index 0000000..f4fad6c --- /dev/null +++ b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/AasRepository/AasRepositoryTests.cs @@ -0,0 +1,70 @@ +using System.Text.Json; + +namespace AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests.AasRepository; + +/// +/// Tests for AAS Repository endpoints +/// +public class AasRepositoryTests : ApiTestBase +{ + [Fact] + public async Task GetShellById_ShouldReturnSuccess_ContentAsExpected() + { + // Arrange + var url = $"/shells/{AasIdentifier}"; + + // Act + var response = await ApiContext.GetAsync(url); + + // Assert + AssertSuccessResponse(response); + var content = await response.TextAsync(); + Assert.False(string.IsNullOrEmpty(content)); + + // Verify it's valid JSON + var json = JsonDocument.Parse(content); + Assert.NotNull(json); + + await CompareJsonAsync(json, Path.Combine(Directory.GetCurrentDirectory(), "AasRepository", "TestData", "GetShellById_Expected.json")); + } + + [Fact] + public async Task GetAssetInformationById_ShouldReturnSuccess_ContentAsExpected() + { + // Arrange + var url = $"/shells/{AasIdentifier}/asset-information"; + + // Act + var response = await ApiContext.GetAsync(url); + + // Assert + AssertSuccessResponse(response); + var content = await response.TextAsync(); + Assert.False(string.IsNullOrEmpty(content)); + + var json = JsonDocument.Parse(content); + Assert.NotNull(json); + + await CompareJsonAsync(json, Path.Combine(Directory.GetCurrentDirectory(), "AasRepository", "TestData", "GetAssetInformationById_Expected.json")); + } + + [Fact] + public async Task GetSubmodelRefById_ShouldReturnSuccess_ContentAsExpected() + { + // Arrange + var url = $"/shells/{AasIdentifier}/submodel-refs"; + + // Act + var response = await ApiContext.GetAsync(url); + + // Assert + AssertSuccessResponse(response); + var content = await response.TextAsync(); + Assert.False(string.IsNullOrEmpty(content)); + + var json = JsonDocument.Parse(content); + Assert.NotNull(json); + + await CompareJsonAsync(json, Path.Combine(Directory.GetCurrentDirectory(), "AasRepository", "TestData", "GetSubmodelRefById_Expected.json")); + } +} diff --git a/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/AasRepository/TestData/GetAssetInformationById_Expected.json b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/AasRepository/TestData/GetAssetInformationById_Expected.json new file mode 100644 index 0000000..19b1f87 --- /dev/null +++ b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/AasRepository/TestData/GetAssetInformationById_Expected.json @@ -0,0 +1,9 @@ +{ + "assetKind": "Instance", + "globalAssetId": "https://mm-software.com/ids/assets/000-001", + "specificAssetIds": [], + "defaultThumbnail": { + "path": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/refs/heads/main/example/data/product1.jpg", + "contentType": "image/jpeg" + } +} diff --git a/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/AasRepository/TestData/GetShellById_Expected.json b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/AasRepository/TestData/GetShellById_Expected.json new file mode 100644 index 0000000..a3d7f66 --- /dev/null +++ b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/AasRepository/TestData/GetShellById_Expected.json @@ -0,0 +1,42 @@ +{ + "id": "https://mm-software.com/ids/aas/000-001", + "assetInformation": { + "assetKind": "Instance", + "globalAssetId": "https://mm-software.com/ids/assets/000-001", + "specificAssetIds": [], + "defaultThumbnail": { + "path": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/refs/heads/main/example/data/product1.jpg", + "contentType": "image/jpeg" + } + }, + "submodels": [ + { + "type": "ModelReference", + "keys": [ + { + "type": "Submodel", + "value": "https://mm-software.com/submodel/000-001/Nameplate" + } + ] + }, + { + "type": "ModelReference", + "keys": [ + { + "type": "Submodel", + "value": "https://mm-software.com/submodel/000-001/ContactInformation" + } + ] + }, + { + "type": "ModelReference", + "keys": [ + { + "type": "Submodel", + "value": "https://mm-software.com/submodel/000-001/Reliability" + } + ] + } + ], + "modelType": "AssetAdministrationShell" +} diff --git a/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/AasRepository/TestData/GetSubmodelRefById_Expected.json b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/AasRepository/TestData/GetSubmodelRefById_Expected.json new file mode 100644 index 0000000..b849a37 --- /dev/null +++ b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/AasRepository/TestData/GetSubmodelRefById_Expected.json @@ -0,0 +1,37 @@ +{ + "paging_metadata": { + "cursor": null + }, + "result": [ + { + "type": "ModelReference", + "referredSemanticId": null, + "keys": [ + { + "type": "Submodel", + "value": "https://mm-software.com/submodel/000-001/Nameplate" + } + ] + }, + { + "type": "ModelReference", + "referredSemanticId": null, + "keys": [ + { + "type": "Submodel", + "value": "https://mm-software.com/submodel/000-001/ContactInformation" + } + ] + }, + { + "type": "ModelReference", + "referredSemanticId": null, + "keys": [ + { + "type": "Submodel", + "value": "https://mm-software.com/submodel/000-001/Reliability" + } + ] + } + ] +} diff --git a/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/ApiTestBase.cs b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/ApiTestBase.cs new file mode 100644 index 0000000..e6f3c83 --- /dev/null +++ b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/ApiTestBase.cs @@ -0,0 +1,84 @@ +using Microsoft.Playwright; + +using System.Text; +using System.Text.Json; + +namespace AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests; + +/// +/// Base class for API tests providing common functionality and configuration +/// +public abstract class ApiTestBase : IAsyncLifetime +{ + private static readonly JsonSerializerOptions JsonSerializerOptions = new() { WriteIndented = false }; + + protected IAPIRequestContext ApiContext { get; private set; } = null!; + protected string BaseUrl { get; private set; } = Environment.GetEnvironmentVariable("BASE_URL") ?? "http://localhost:8085"; + + // Base64 encoded identifiers + protected string AasIdentifier { get; private set; } = null!; + protected string SubmodelIdentifierContact { get; private set; } = null!; + protected string SubmodelIdentifierNameplate { get; private set; } = null!; + protected string SubmodelIdentifierReliability { get; private set; } = null!; + + public async Task InitializeAsync() + { + // Initialize Playwright + var playwright = await Playwright.CreateAsync(); + + // Create API request context + ApiContext = await playwright.APIRequest.NewContextAsync(new() + { + BaseURL = BaseUrl, + IgnoreHTTPSErrors = true, + ExtraHTTPHeaders = new Dictionary + { + { "Accept", "application/json" } + } + }); + + // Initialize base64 encoded identifiers + AasIdentifier = Base64EncodeUrl("https://mm-software.com/ids/aas/000-001"); + SubmodelIdentifierContact = Base64EncodeUrl("https://mm-software.com/submodel/000-001/ContactInformation"); + SubmodelIdentifierNameplate = Base64EncodeUrl("https://mm-software.com/submodel/000-001/Nameplate"); + SubmodelIdentifierReliability = Base64EncodeUrl("https://mm-software.com/submodel/000-001/Reliability"); + } + + public async Task DisposeAsync() => await ApiContext.DisposeAsync(); + + /// + /// Base64 URL encodes a string + /// + public static string Base64EncodeUrl(string str) + { + var bytes = Encoding.UTF8.GetBytes(str); + return Convert.ToBase64String(bytes); + } + + /// + /// Asserts that an API response is successful + /// + protected static void AssertSuccessResponse(IAPIResponse response) + { + ArgumentNullException.ThrowIfNull(response); + Assert.True(response.Ok, $"Expected successful response but got {response.Status}: {response.StatusText}"); + } + + /// + /// Asserts that an JsonDocument is equals to the expected JSON content from a file + /// + protected static async Task CompareJsonAsync(JsonDocument actualDoc, string fullPath) + { + // Load expected test data and compare + var expectedJson = await File.ReadAllTextAsync(fullPath); + + var expectedDoc = JsonDocument.Parse(expectedJson); + Assert.NotNull(expectedDoc); + + + // Compare JSON content (normalize formatting for comparison) + var expectedNormalized = JsonSerializer.Serialize(expectedDoc, JsonSerializerOptions); + var actualNormalized = JsonSerializer.Serialize(actualDoc, JsonSerializerOptions); + Assert.Equal(expectedNormalized, actualNormalized); + } +} diff --git a/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/DataEngine/HealthTests.cs b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/DataEngine/HealthTests.cs new file mode 100644 index 0000000..2a1ce00 --- /dev/null +++ b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/DataEngine/HealthTests.cs @@ -0,0 +1,22 @@ +namespace AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests.DataEngine; + +/// +/// Tests for Data Engine health endpoint +/// +public class HealthTests : ApiTestBase +{ + [Fact] + public async Task GetHealth_ShouldReturnSuccess_EqualsHealthy() + { + // Arrange + var url = "/healthz"; + + // Act + var response = await ApiContext.GetAsync(url); + + // Assert + AssertSuccessResponse(response); + var content = await response.TextAsync(); + Assert.Equal("Healthy", content); + } +} diff --git a/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/README.md b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/README.md new file mode 100644 index 0000000..02e0f06 --- /dev/null +++ b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/README.md @@ -0,0 +1,154 @@ +# AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests + +This project contains Playwright-based REST API tests for the AAS TwinEngine Plugin TestPlugin. + +## Overview + +The tests are organized to match the Bruno API collection structure and cover the following areas: + +- **AAS Repository**: Tests for shell operations, asset information, and submodel references +- **Submodel Repository**: Tests for submodels and submodel elements +- **Registry**: Tests for AAS and Submodel descriptors +- **Serialization**: Tests for appropriate serialization endpoints + +## Prerequisites + +1. .NET 8.0 SDK +2. Playwright for .NET +3. Running instance of the DataEngine service (default: http://localhost:8085) + +## Installation + +First, restore the NuGet packages: + +```powershell +dotnet restore +``` + +Build: + +```powershell +dotnet build +``` + +## Running Tests + +### Run all tests + +```powershell +dotnet test +``` + +### Run specific test class + +```powershell +dotnet test --filter FullyQualifiedName~AasRepositoryTests +``` + +### Run with different base URL + +Set the environment variable before running tests: + +```powershell +$env:BASE_URL="http://localhost:8085" +dotnet test +``` + +## Project Structure + +``` +AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/ +├── ApiTestBase.cs # Base class for all API tests +├── AasRegistry/ +│ └── AasRegistryTests.cs # Tests for AAS Registry endpoints +├── AasRepository/ +│ └── AasRepositoryTests.cs # Tests for AAS Repository endpoints +├── DataEngine/ +│ └── HealthTests.cs # Tests for Data Engine health endpoint +├── SubmodelRegistry/ +│ └── SubmodelRegistryTests.cs # Tests for Submodel Registry endpoints +└── SubmodelRepository/ + ├── SubmodelTests.cs # Tests for Submodel endpoints + ├── SubmodelElementTests.cs # Tests for Submodel Element endpoints + └── SerializationTests.cs # Tests for Serialization endpoints +``` + +## Test Structure + +### Base Classes + +- **ApiTestBase.cs**: Base class providing common functionality for all API tests + - Initializes Playwright API request context + - Provides Base64 URL encoding for identifiers + - Contains assertion helpers + - Manages configuration including base URL and test identifiers + +### Test Classes + +1. **AasRepository/AasRepositoryTests.cs**: Tests for AAS Repository endpoints + - GetShellById + - GetAssetInformationById + - GetSubmodelRefById + +2. **SubmodelRepository/SubmodelTests.cs**: Tests for Submodel endpoints + - GetSubmodel for Nameplate, ContactInfo, and Reliability + +3. **SubmodelRepository/SubmodelElementTests.cs**: Tests for Submodel Element endpoints + - GetSubmodelElement for various element types and submodels + +4. **DataEngine/HealthTests.cs**: Tests for Data Engine health endpoint + - GetHealth + +5. **AasRegistry/AasRegistryTests.cs**: Tests for AAS Registry endpoints + - GetAllShellDescriptors (with and without pagination) + - GetShellDescriptorById + +6. **SubmodelRegistry/SubmodelRegistryTests.cs**: Tests for Submodel Registry endpoints + - GetSubmodelDescriptorById for various submodels + +7. **SubmodelRepository/SerializationTests.cs**: Tests for Serialization endpoints + - GetAppropriateSerialization with multiple submodels + +## Configuration + +The tests use the following default configuration: + +- **Base URL**: `http://localhost:8085` +- **AAS Identifier**: `https://mm-software.com/ids/aas/000-001` +- **Submodel Identifiers**: + - ContactInformation: `https://mm-software.com/submodel/000-001/ContactInformation` + - Nameplate: `https://mm-software.com/submodel/000-001/Nameplate` + - Reliability: `https://mm-software.com/submodel/000-001/Reliability` + +All identifiers are automatically Base64 URL encoded in the tests. + +## Example Test + +```csharp +[Fact] + public async Task GetShellById_ShouldReturnSuccess_ContentAsExpected() + { + // Arrange + var url = $"/shells/{AasIdentifier}"; + + // Act + var response = await ApiContext.GetAsync(url); + + // Assert + AssertSuccessResponse(response); + var content = await response.TextAsync(); + Assert.False(string.IsNullOrEmpty(content)); + + // Verify it's valid JSON + var json = JsonDocument.Parse(content); + Assert.NotNull(json); + + await CompareJsonAsync(json, Path.Combine(Directory.GetCurrentDirectory(), "AasRepository", "TestData", "GetShellById_Expected.json")); + } +``` + +## Notes + +- All tests inherit from `ApiTestBase` which implements `IAsyncLifetime` for proper setup and teardown +- Identifiers are Base64 URL encoded as required by the API +- JSON responses are validated to ensure they are well-formed diff --git a/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRegistry/SubmodelRegistryTests.cs b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRegistry/SubmodelRegistryTests.cs new file mode 100644 index 0000000..0487d5c --- /dev/null +++ b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRegistry/SubmodelRegistryTests.cs @@ -0,0 +1,69 @@ +using System.Text.Json; + +namespace AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests.SubmodelRegistry; + +/// +/// Tests for Submodel Registry endpoints +/// +public class SubmodelRegistryTests : ApiTestBase +{ + [Fact] + public async Task GetSubmodelDescriptorById_Contact_ShouldReturnSuccess_ContentAsExpected() + { + // Arrange + var url = $"/submodel-descriptors/{SubmodelIdentifierContact}"; + + // Act + var response = await ApiContext.GetAsync(url); + + // Assert + AssertSuccessResponse(response); + var content = await response.TextAsync(); + Assert.False(string.IsNullOrEmpty(content)); + + var json = JsonDocument.Parse(content); + Assert.NotNull(json); + + await CompareJsonAsync(json, Path.Combine(Directory.GetCurrentDirectory(), "SubmodelRegistry", "TestData", "GetSubmodelDescriptorById_Contact_Expected.json")); + } + + [Fact] + public async Task GetSubmodelDescriptorById_Nameplate_ShouldReturnSuccess_ContentAsExpected() + { + // Arrange + var url = $"/submodel-descriptors/{SubmodelIdentifierNameplate}"; + + // Act + var response = await ApiContext.GetAsync(url); + + // Assert + AssertSuccessResponse(response); + var content = await response.TextAsync(); + Assert.False(string.IsNullOrEmpty(content)); + + var json = JsonDocument.Parse(content); + Assert.NotNull(json); + + await CompareJsonAsync(json, Path.Combine(Directory.GetCurrentDirectory(), "SubmodelRegistry", "TestData", "GetSubmodelDescriptorById_Nameplate_Expected.json")); + } + + [Fact] + public async Task GetSubmodelDescriptorById_Reliability_ShouldReturnSuccess_ContentAsExpected() + { + // Arrange + var url = $"/submodel-descriptors/{SubmodelIdentifierReliability}"; + + // Act + var response = await ApiContext.GetAsync(url); + + // Assert + AssertSuccessResponse(response); + var content = await response.TextAsync(); + Assert.False(string.IsNullOrEmpty(content)); + + var json = JsonDocument.Parse(content); + Assert.NotNull(json); + + await CompareJsonAsync(json, Path.Combine(Directory.GetCurrentDirectory(), "SubmodelRegistry", "TestData", "GetSubmodelDescriptorById_Reliability_Expected.json")); + } +} diff --git a/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRegistry/TestData/GetSubmodelDescriptorById_Contact_Expected.json b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRegistry/TestData/GetSubmodelDescriptorById_Contact_Expected.json new file mode 100644 index 0000000..b4a9f22 --- /dev/null +++ b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRegistry/TestData/GetSubmodelDescriptorById_Contact_Expected.json @@ -0,0 +1,28 @@ +{ + "description": null, + "displayName": null, + "extensions": null, + "administration": null, + "idShort": "ContactInformations", + "id": "https://mm-software.com/submodel/000-001/ContactInformation", + "semanticId": { + "type": 0, + "referredSemanticId": null, + "keys": null + }, + "supplementalSemanticId": null, + "endpoints": [ + { + "interface": "SUBMODEL-3.0", + "protocolInformation": { + "href": "http://localhost:8080/submodels/aHR0cHM6Ly9tbS1zb2Z0d2FyZS5jb20vc3VibW9kZWwvMDAwLTAwMS9Db250YWN0SW5mb3JtYXRpb24", + "endpointProtocol": "http", + "endpointProtocolVersion": null, + "subprotocol": null, + "subprotocolBody": null, + "subprotocolBodyEncoding": null, + "securityAttributes": null + } + } + ] +} diff --git a/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRegistry/TestData/GetSubmodelDescriptorById_Nameplate_Expected.json b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRegistry/TestData/GetSubmodelDescriptorById_Nameplate_Expected.json new file mode 100644 index 0000000..60d8e98 --- /dev/null +++ b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRegistry/TestData/GetSubmodelDescriptorById_Nameplate_Expected.json @@ -0,0 +1,39 @@ +{ + "description": [ + { + "language": null, + "text": null + } + ], + "displayName": null, + "extensions": null, + "administration": { + "embeddedDataSpecifications": null, + "version": null, + "revision": null, + "creator": null, + "templateId": null + }, + "idShort": "Nameplate", + "id": "https://mm-software.com/submodel/000-001/Nameplate", + "semanticId": { + "type": 0, + "referredSemanticId": null, + "keys": null + }, + "supplementalSemanticId": null, + "endpoints": [ + { + "interface": "SUBMODEL-3.0", + "protocolInformation": { + "href": "http://localhost:8080/submodels/aHR0cHM6Ly9tbS1zb2Z0d2FyZS5jb20vc3VibW9kZWwvMDAwLTAwMS9OYW1lcGxhdGU", + "endpointProtocol": "http", + "endpointProtocolVersion": null, + "subprotocol": null, + "subprotocolBody": null, + "subprotocolBodyEncoding": null, + "securityAttributes": null + } + } + ] +} diff --git a/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRegistry/TestData/GetSubmodelDescriptorById_Reliability_Expected.json b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRegistry/TestData/GetSubmodelDescriptorById_Reliability_Expected.json new file mode 100644 index 0000000..d061eff --- /dev/null +++ b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRegistry/TestData/GetSubmodelDescriptorById_Reliability_Expected.json @@ -0,0 +1,34 @@ +{ + "description": null, + "displayName": null, + "extensions": null, + "administration": { + "embeddedDataSpecifications": null, + "version": null, + "revision": null, + "creator": null, + "templateId": null + }, + "idShort": "Reliability", + "id": "https://mm-software.com/submodel/000-001/Reliability", + "semanticId": { + "type": 0, + "referredSemanticId": null, + "keys": null + }, + "supplementalSemanticId": null, + "endpoints": [ + { + "interface": "SUBMODEL-3.0", + "protocolInformation": { + "href": "http://localhost:8080/submodels/aHR0cHM6Ly9tbS1zb2Z0d2FyZS5jb20vc3VibW9kZWwvMDAwLTAwMS9SZWxpYWJpbGl0eQ", + "endpointProtocol": "http", + "endpointProtocolVersion": null, + "subprotocol": null, + "subprotocolBody": null, + "subprotocolBodyEncoding": null, + "securityAttributes": null + } + } + ] +} diff --git a/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/SerializationTests.cs b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/SerializationTests.cs new file mode 100644 index 0000000..b3191b0 --- /dev/null +++ b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/SerializationTests.cs @@ -0,0 +1,29 @@ +namespace AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests.SubmodelRepository; + +/// +/// Tests for appropriate serialization endpoints +/// +public class SerializationTests : ApiTestBase +{ + [Fact] + public async Task GetAppropriateSerialization_WithMultipleSubmodels_ShouldReturnSuccess() + { + // Arrange + var url = $"/serialization" + + $"?aasIds={AasIdentifier}" + + $"&submodelIds={SubmodelIdentifierContact}" + + $"&submodelIds={SubmodelIdentifierNameplate}" + + $"&submodelIds={SubmodelIdentifierReliability}" + + $"&includeConceptDescriptions=false"; + + // Act + var response = await ApiContext.GetAsync(url); + var content = await response.TextAsync(); + + Assert.False(string.IsNullOrEmpty(content)); + + Assert.Contains("https://mm-software.com/submodel/000-001/Nameplate", content, System.StringComparison.Ordinal); + Assert.Contains("https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/ContactInformation", content, System.StringComparison.Ordinal); + Assert.Contains("http://schemas.openxmlformats.org/package/2006/relationships", content, System.StringComparison.Ordinal); + } +} diff --git a/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/SubmodelElementTests.cs b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/SubmodelElementTests.cs new file mode 100644 index 0000000..7fd624d --- /dev/null +++ b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/SubmodelElementTests.cs @@ -0,0 +1,89 @@ +using System.Text.Json; + +namespace AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests.SubmodelRepository; + +/// +/// Tests for Submodel Element endpoints +/// +public class SubmodelElementTests : ApiTestBase +{ + [Fact] + public async Task GetSubmodelElement_ContactInfo_ContactInformation_ShouldReturnSuccess_ContentAsExpected() + { + // Arrange + var url = $"/submodels/{SubmodelIdentifierContact}/submodel-elements/ContactInformation1"; + + // Act + var response = await ApiContext.GetAsync(url); + + // Assert + AssertSuccessResponse(response); + var content = await response.TextAsync(); + Assert.False(string.IsNullOrEmpty(content)); + + var json = JsonDocument.Parse(content); + Assert.NotNull(json); + + await CompareJsonAsync(json, Path.Combine(Directory.GetCurrentDirectory(), "SubmodelRepository", "TestData", "GetSubmodelElement_ContactInfo_ContactInformation_Expected.json")); + } + + [Fact] + public async Task GetSubmodelElement_Nameplate_Markings_ShouldReturnSuccess_ContentAsExpected() + { + // Arrange + var url = $"/submodels/{SubmodelIdentifierNameplate}/submodel-elements/Markings"; + + // Act + var response = await ApiContext.GetAsync(url); + + // Assert + AssertSuccessResponse(response); + var content = await response.TextAsync(); + Assert.False(string.IsNullOrEmpty(content)); + + var json = JsonDocument.Parse(content); + Assert.NotNull(json); + + await CompareJsonAsync(json, Path.Combine(Directory.GetCurrentDirectory(), "SubmodelRepository", "TestData", "GetSubmodelElement_Nameplate_Markings_Expected.json")); + } + + [Fact] + public async Task GetSubmodelElement_Nameplate_ManufacturerName_ShouldReturnSuccess_ContentAsExpected() + { + // Arrange + var url = $"/submodels/{SubmodelIdentifierNameplate}/submodel-elements/ManufacturerName"; + + // Act + var response = await ApiContext.GetAsync(url); + + // Assert + AssertSuccessResponse(response); + var content = await response.TextAsync(); + Assert.False(string.IsNullOrEmpty(content)); + + var json = JsonDocument.Parse(content); + Assert.NotNull(json); + + await CompareJsonAsync(json, Path.Combine(Directory.GetCurrentDirectory(), "SubmodelRepository", "TestData", "GetSubmodelElement_Nameplate_ManufacturerName_Expected.json")); + } + + [Fact] + public async Task GetSubmodelElement_Reliability_ReliabilityCharacteristics_MTTF_ShouldReturnSuccess_ContentAsExpected() + { + // Arrange + var url = $"/submodels/{SubmodelIdentifierReliability}/submodel-elements/ReliabilityCharacteristics.MTTF"; + + // Act + var response = await ApiContext.GetAsync(url); + + // Assert + AssertSuccessResponse(response); + var content = await response.TextAsync(); + Assert.False(string.IsNullOrEmpty(content)); + + var json = JsonDocument.Parse(content); + Assert.NotNull(json); + + await CompareJsonAsync(json, Path.Combine(Directory.GetCurrentDirectory(), "SubmodelRepository", "TestData", "GetSubmodelElement_Reliability_ReliabilityCharacteristics_MTTF.json")); + } +} diff --git a/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/SubmodelTests.cs b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/SubmodelTests.cs new file mode 100644 index 0000000..e8fc8ad --- /dev/null +++ b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/SubmodelTests.cs @@ -0,0 +1,69 @@ +using System.Text.Json; + +namespace AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests.SubmodelRepository; + +/// +/// Tests for Submodel endpoints +/// +public class SubmodelTests : ApiTestBase +{ + [Fact] + public async Task GetSubmodel_Nameplate_ShouldReturnSuccess_ContentAsExpected() + { + // Arrange + var url = $"/submodels/{SubmodelIdentifierNameplate}/"; + + // Act + var response = await ApiContext.GetAsync(url); + + // Assert + AssertSuccessResponse(response); + var content = await response.TextAsync(); + Assert.False(string.IsNullOrEmpty(content)); + + var json = JsonDocument.Parse(content); + Assert.NotNull(json); + + await CompareJsonAsync(json, Path.Combine(Directory.GetCurrentDirectory(), "SubmodelRepository", "TestData", "GetSubmodel_Nameplate_Expected.json")); + } + + [Fact] + public async Task GetSubmodel_ContactInfo_ShouldReturnSuccess_ContentAsExpected() + { + // Arrange + var url = $"/submodels/{SubmodelIdentifierContact}/"; + + // Act + var response = await ApiContext.GetAsync(url); + + // Assert + AssertSuccessResponse(response); + var content = await response.TextAsync(); + Assert.False(string.IsNullOrEmpty(content)); + + var json = JsonDocument.Parse(content); + Assert.NotNull(json); + + await CompareJsonAsync(json, Path.Combine(Directory.GetCurrentDirectory(), "SubmodelRepository", "TestData", "GetSubmodel_ContactInfo_Expected.json")); + } + + [Fact] + public async Task GetSubmodel_Reliability_ShouldReturnSuccess_ContentAsExpected() + { + // Arrange + var url = $"/submodels/{SubmodelIdentifierReliability}/"; + + // Act + var response = await ApiContext.GetAsync(url); + + // Assert + AssertSuccessResponse(response); + var content = await response.TextAsync(); + Assert.False(string.IsNullOrEmpty(content)); + + var json = JsonDocument.Parse(content); + Assert.NotNull(json); + + await CompareJsonAsync(json, Path.Combine(Directory.GetCurrentDirectory(), "SubmodelRepository", "TestData", "GetSubmodel_Reliability_Expected.json")); + } +} diff --git a/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/TestData/GetSubmodelElement_ContactInfo_ContactInformation_Expected.json b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/TestData/GetSubmodelElement_ContactInfo_ContactInformation_Expected.json new file mode 100644 index 0000000..b55a8ee --- /dev/null +++ b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/TestData/GetSubmodelElement_ContactInfo_ContactInformation_Expected.json @@ -0,0 +1,719 @@ +{ + "idShort": "ContactInformation1", + "description": [ + { + "language": "en", + "text": "The SMC “ContactInformation” contains information on how to contact the manufacturer or an authorised service provider, e.g. when a maintenance service is required" + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/ContactInformation" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "OneToMany" + } + ], + "value": [ + { + "idShort": "RoleOfContactPerson", + "description": [ + { + "language": "en", + "text": "enumeration: 0173-1#07-AAS927#001 (administrativ contact), 0173-1#07-AAS928#001 (commercial contact), 0173-1#07-AAS929#001 (other contact), 0173-1#07-AAS930#001 (hazardous goods contact), 0173-1#07-AAS931#001 (technical contact). Note: the above mentioned ECLASS enumeration should be declared as “open” for further addition. ECLASS enumeration IRDI is preferable. If no IRDI available, custom input as String may also be accepted." + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO204#003" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "valueType": "xs:string", + "value": "Marketing Manager", + "modelType": "Property" + }, + { + "idShort": "AddressOfAdditionalLink", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAQ326#002" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + }, + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://mm-software.com/twinengine/qualifier" + } + ] + }, + "kind": "TemplateQualifier", + "type": "InternalSemanticId", + "valueType": "xs:string", + "value": "https://mm-software.com/AddressOfAdditionalLink" + } + ], + "valueType": "xs:string", + "value": "https://www.mm-software.com/more-the-newsroom/", + "modelType": "Property" + }, + { + "idShort": "Company", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAW001#001" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "value": [ + { + "language": "en", + "text": "Acme Corporation" + } + ], + "modelType": "MultiLanguageProperty" + }, + { + "idShort": "Department", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO127#003" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "value": [ + { + "language": "de", + "text": "Marketing" + } + ], + "modelType": "MultiLanguageProperty" + }, + { + "idShort": "Street", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO128#002" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "value": [ + { + "language": "de", + "text": "Bahnhofstraße 25" + } + ], + "modelType": "MultiLanguageProperty" + }, + { + "idShort": "Zipcode", + "description": [ + { + "language": "en", + "text": "Recommendation: property declaration as MLP is required by its semantic definition. As the property value is language independent, users are recommended to provide maximal 1 string in any language of the user’s choice." + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO129#002" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "value": [ + { + "language": "de", + "text": "80335" + } + ], + "modelType": "MultiLanguageProperty" + }, + { + "idShort": "StateCounty", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO133#002" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "value": [ + { + "language": "de", + "text": "Bayern" + } + ], + "modelType": "MultiLanguageProperty" + }, + { + "idShort": "NameOfContact", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO205#002" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "value": [ + { + "language": "en", + "text": "John Doe" + } + ], + "modelType": "MultiLanguageProperty" + }, + { + "idShort": "Email", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAQ836#005" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "value": [ + { + "idShort": "EmailAddress", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO198#002" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "One" + } + ], + "valueType": "xs:string", + "value": "john.doe@example.com", + "modelType": "Property" + }, + { + "idShort": "TypeOfEmailAddress", + "description": [ + { + "language": "en", + "text": "enumeration: 0173-1#07-AAS754#001 (office), 0173-1#07-AAS756#001 (secretary), 0173-1#07-AAS757#001 (substitute), 0173-1#07-AAS758#001 (home)" + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO199#003" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "valueType": "xs:string", + "value": "Work", + "modelType": "Property" + } + ], + "modelType": "SubmodelElementCollection" + }, + { + "idShort": "IPCommunication__00__", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToMany" + } + ], + "value": [ + { + "idShort": "AddressOfAdditionalLink", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAQ326#002" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "One" + }, + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://mm-software.com/twinengine/qualifier" + } + ] + }, + "kind": "TemplateQualifier", + "type": "InternalSemanticId", + "valueType": "xs:string", + "value": "https://mm-software.com/ipCommunication/AddressOfAdditionalLink" + } + ], + "valueType": "xs:string", + "value": "https://www.mm-software.com/more-the-newsroom/", + "modelType": "Property" + }, + { + "idShort": "TypeOfCommunication", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/ContactInformation/IPCommunication/TypeOfCommunication" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "valueType": "xs:string", + "value": "Chat", + "modelType": "Property" + }, + { + "idShort": "AvailableTime", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/ContactInformation/AvailableTime/" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + }, + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://mm-software.com/twinengine/qualifier" + } + ] + }, + "kind": "TemplateQualifier", + "type": "InternalSemanticId", + "valueType": "xs:string", + "value": "https://mm-software.com/IPCommunication/AvailableTime" + } + ], + "value": [ + { + "language": "de", + "text": "8:00 AM to 6:00 PM" + } + ], + "modelType": "MultiLanguageProperty" + } + ], + "modelType": "SubmodelElementCollection" + }, + { + "idShort": "Phone0", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/ContactInformation/Phone" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "value": [ + { + "idShort": "TelephoneNumber", + "description": [ + { + "language": "en", + "text": "Recommendation: property declaration as MLP is required by its semantic definition. As the property value is language independent, users are recommended to provide maximal 1 string in any language of the user’s choice." + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO136#002" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "One" + } + ], + "value": [ + { + "language": "en", + "text": "234-567-8901" + } + ], + "modelType": "MultiLanguageProperty" + }, + { + "idShort": "AvailableTime", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/ContactInformation/AvailableTime/" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + }, + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://mm-software.com/twinengine/qualifier" + } + ] + }, + "kind": "TemplateQualifier", + "type": "InternalSemanticId", + "valueType": "xs:string", + "value": "https://mm-software.com/Phone/AvailableTime" + } + ], + "value": [ + { + "language": "de", + "text": "Dienstags bis Donnerstags, 9-17 Uhr" + } + ], + "modelType": "MultiLanguageProperty" + }, + { + "idShort": "TypeOfTelephone", + "description": [ + { + "language": "en", + "text": " enumeration: 0173-1#07-AAS754#001 (office), 0173-1#07-AAS755#001 (office mobile), 0173-1#07-AAS756#001 (secretary), 0173-1#07-AAS757#001 (substitute), 0173-1#07-AAS758#001 (home), 0173-1#07-AAS759#001 (private mobile)" + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO137#003" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "valueType": "xs:string", + "value": "Office", + "modelType": "Property" + } + ], + "modelType": "SubmodelElementCollection" + }, + { + "idShort": "Phone1", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/ContactInformation/Phone" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "value": [ + { + "idShort": "TelephoneNumber", + "description": [ + { + "language": "en", + "text": "Recommendation: property declaration as MLP is required by its semantic definition. As the property value is language independent, users are recommended to provide maximal 1 string in any language of the user’s choice." + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO136#002" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "One" + } + ], + "value": [ + { + "language": "en", + "text": "345-678-9012" + } + ], + "modelType": "MultiLanguageProperty" + }, + { + "idShort": "AvailableTime", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/ContactInformation/AvailableTime/" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + }, + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://mm-software.com/twinengine/qualifier" + } + ] + }, + "kind": "TemplateQualifier", + "type": "InternalSemanticId", + "valueType": "xs:string", + "value": "https://mm-software.com/Phone/AvailableTime" + } + ], + "value": [ + { + "language": "de", + "text": "Montags, 10-16 Uhr" + } + ], + "modelType": "MultiLanguageProperty" + }, + { + "idShort": "TypeOfTelephone", + "description": [ + { + "language": "en", + "text": " enumeration: 0173-1#07-AAS754#001 (office), 0173-1#07-AAS755#001 (office mobile), 0173-1#07-AAS756#001 (secretary), 0173-1#07-AAS757#001 (substitute), 0173-1#07-AAS758#001 (home), 0173-1#07-AAS759#001 (private mobile)" + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO137#003" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "valueType": "xs:string", + "value": "Mobile", + "modelType": "Property" + } + ], + "modelType": "SubmodelElementCollection" + } + ], + "modelType": "SubmodelElementCollection" +} diff --git a/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/TestData/GetSubmodelElement_Nameplate_ManufacturerName_Expected.json b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/TestData/GetSubmodelElement_Nameplate_ManufacturerName_Expected.json new file mode 100644 index 0000000..a74f935 --- /dev/null +++ b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/TestData/GetSubmodelElement_Nameplate_ManufacturerName_Expected.json @@ -0,0 +1,47 @@ +{ + "idShort": "ManufacturerName", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABA565#009" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO677#004" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "One" + } + ], + "value": [ + { + "language": "de", + "text": "M&M" + } + ], + "modelType": "MultiLanguageProperty" +} diff --git a/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/TestData/GetSubmodelElement_Nameplate_Markings_Expected.json b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/TestData/GetSubmodelElement_Nameplate_Markings_Expected.json new file mode 100644 index 0000000..bba1f98 --- /dev/null +++ b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/TestData/GetSubmodelElement_Nameplate_Markings_Expected.json @@ -0,0 +1,699 @@ +{ + "idShort": "Markings", + "description": [ + { + "language": "en", + "text": "Note: CE marking is declared as mandatory according to EU Blue Guide" + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61360_7#AAS006#001" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-ABI563#003/0173-1#01-AHF849#003" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "orderRelevant": false, + "typeValueListElement": "SubmodelElementCollection", + "value": [ + { + "description": [ + { + "language": "en", + "text": "Note: CE marking is declared as mandatory according to the Blue Guide of the EU-Commission" + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61360_7#AAS009#001" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-ABI564#003/0173-1#01-AHF850#003" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "OneToMany" + } + ], + "value": [ + { + "idShort": "MarkingName", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABA231#009" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-ABI190#003" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "One" + } + ], + "valueType": "xs:string", + "value": "0173-1#07-DAA603#004", + "modelType": "Property" + }, + { + "idShort": "DesignationOfCertificateOrApproval", + "description": [ + { + "language": "en", + "text": "Note: Approval identifier, reference to the certificate number, to be entered without spaces " + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABH783#003" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-ABI975#002" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "valueType": "xs:string", + "value": "KEMA99IECEX1105/128", + "modelType": "Property" + }, + { + "idShort": "IssueDate", + "description": [ + { + "language": "en", + "text": "Note: format by lexical representation: CCYY-MM-DD Note: to be specified to the day " + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABO097#001" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-ABL774#001" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "valueType": "xs:date", + "value": "2022-01-01", + "modelType": "Property" + }, + { + "idShort": "ExpiryDate", + "description": [ + { + "language": "en", + "text": "Note: format by lexical representation: CCYY-MM-DD Note: to be specified to the day " + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABH830#002" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-ABL775#001" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "valueType": "xs:date", + "value": "2022-01-01", + "modelType": "Property" + }, + { + "idShort": "MarkingAdditionalText", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABB146#007" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-ABI192#003" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToMany" + } + ], + "valueType": "xs:string", + "value": "0044", + "modelType": "Property" + }, + { + "idShort": "MarkingFile", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABO100#002" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-ABI191#003" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "One" + } + ], + "value": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/refs/heads/main/example/data/checkmark.png", + "contentType": "image/png", + "modelType": "File" + } + ], + "modelType": "SubmodelElementCollection" + }, + { + "description": [ + { + "language": "en", + "text": "Note: CE marking is declared as mandatory according to the Blue Guide of the EU-Commission" + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61360_7#AAS009#001" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-ABI564#003/0173-1#01-AHF850#003" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "OneToMany" + } + ], + "value": [ + { + "idShort": "MarkingName", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABA231#009" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-ABI190#003" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "One" + } + ], + "valueType": "xs:string", + "value": "0173-1#07-DAA603#004-2", + "modelType": "Property" + }, + { + "idShort": "DesignationOfCertificateOrApproval", + "description": [ + { + "language": "en", + "text": "Note: Approval identifier, reference to the certificate number, to be entered without spaces " + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABH783#003" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-ABI975#002" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "valueType": "xs:string", + "value": "KEMA99IECEX1105/128-2", + "modelType": "Property" + }, + { + "idShort": "IssueDate", + "description": [ + { + "language": "en", + "text": "Note: format by lexical representation: CCYY-MM-DD Note: to be specified to the day " + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABO097#001" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-ABL774#001" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "valueType": "xs:date", + "value": "2025-01-01", + "modelType": "Property" + }, + { + "idShort": "ExpiryDate", + "description": [ + { + "language": "en", + "text": "Note: format by lexical representation: CCYY-MM-DD Note: to be specified to the day " + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABH830#002" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-ABL775#001" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "valueType": "xs:date", + "value": "2025-01-01", + "modelType": "Property" + }, + { + "idShort": "MarkingAdditionalText", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABB146#007" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-ABI192#003" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToMany" + } + ], + "valueType": "xs:string", + "value": "00100", + "modelType": "Property" + }, + { + "idShort": "MarkingFile", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABO100#002" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-ABI191#003" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "One" + } + ], + "value": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/refs/heads/main/example/data/checkmark.png", + "contentType": "image/png", + "modelType": "File" + } + ], + "modelType": "SubmodelElementCollection" + } + ], + "modelType": "SubmodelElementList" +} diff --git a/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/TestData/GetSubmodelElement_Reliability_ReliabilityCharacteristics_MTTF.json b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/TestData/GetSubmodelElement_Reliability_ReliabilityCharacteristics_MTTF.json new file mode 100644 index 0000000..f193588 --- /dev/null +++ b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/TestData/GetSubmodelElement_Reliability_ReliabilityCharacteristics_MTTF.json @@ -0,0 +1,45 @@ +{ + "idShort": "MTTF", + "description": [ + { + "language": "en", + "text": "mean operating time to failure" + }, + { + "language": "fr", + "text": "durée moyenne de fonctionnement avant défaillance" + }, + { + "language": "de", + "text": "mittlere Betriebszeit bis zum Ausfall" + }, + { + "language": "jp", + "text": "平均故障間動作時間" + }, + { + "language": "cn", + "text": "平均失效前工作时间" + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///62683#ACE061#001" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToMany" + } + ], + "valueType": "xs:int", + "value": "2", + "modelType": "Property" +} diff --git a/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/TestData/GetSubmodel_ContactInfo_Expected.json b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/TestData/GetSubmodel_ContactInfo_Expected.json new file mode 100644 index 0000000..656b7c2 --- /dev/null +++ b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/TestData/GetSubmodel_ContactInfo_Expected.json @@ -0,0 +1,1455 @@ +{ + "idShort": "ContactInformations", + "id": "https://mm-software.com/submodel/000-001/ContactInformation", + "kind": "Template", + "semanticId": { + "type": "ModelReference", + "keys": [ + { + "type": "Submodel", + "value": "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations" + } + ] + }, + "submodelElements": [ + { + "idShort": "ContactInformation0", + "description": [ + { + "language": "en", + "text": "The SMC “ContactInformation” contains information on how to contact the manufacturer or an authorised service provider, e.g. when a maintenance service is required" + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/ContactInformation" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "OneToMany" + } + ], + "value": [ + { + "idShort": "RoleOfContactPerson", + "description": [ + { + "language": "en", + "text": "enumeration: 0173-1#07-AAS927#001 (administrativ contact), 0173-1#07-AAS928#001 (commercial contact), 0173-1#07-AAS929#001 (other contact), 0173-1#07-AAS930#001 (hazardous goods contact), 0173-1#07-AAS931#001 (technical contact). Note: the above mentioned ECLASS enumeration should be declared as “open” for further addition. ECLASS enumeration IRDI is preferable. If no IRDI available, custom input as String may also be accepted." + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO204#003" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "valueType": "xs:string", + "value": "Manager001", + "modelType": "Property" + }, + { + "idShort": "AddressOfAdditionalLink", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAQ326#002" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + }, + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://mm-software.com/twinengine/qualifier" + } + ] + }, + "kind": "TemplateQualifier", + "type": "InternalSemanticId", + "valueType": "xs:string", + "value": "https://mm-software.com/AddressOfAdditionalLink" + } + ], + "valueType": "xs:string", + "value": "https://www.mm-software.com/mobile-arbeitsmaschinen/", + "modelType": "Property" + }, + { + "idShort": "Company", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAW001#001" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "value": [ + { + "language": "en", + "text": "Acme Corporation" + } + ], + "modelType": "MultiLanguageProperty" + }, + { + "idShort": "Department", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO127#003" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "value": [ + { + "language": "de", + "text": "Marketing" + } + ], + "modelType": "MultiLanguageProperty" + }, + { + "idShort": "Street", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO128#002" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "value": [ + { + "language": "de", + "text": "Bahnhofstraße 25" + } + ], + "modelType": "MultiLanguageProperty" + }, + { + "idShort": "Zipcode", + "description": [ + { + "language": "en", + "text": "Recommendation: property declaration as MLP is required by its semantic definition. As the property value is language independent, users are recommended to provide maximal 1 string in any language of the user’s choice." + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO129#002" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "value": [ + { + "language": "de", + "text": "80335" + } + ], + "modelType": "MultiLanguageProperty" + }, + { + "idShort": "StateCounty", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO133#002" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "value": [ + { + "language": "de", + "text": "Bayern" + } + ], + "modelType": "MultiLanguageProperty" + }, + { + "idShort": "NameOfContact", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO205#002" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "value": [ + { + "language": "en", + "text": "John Doe" + } + ], + "modelType": "MultiLanguageProperty" + }, + { + "idShort": "Email", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAQ836#005" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "value": [ + { + "idShort": "EmailAddress", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO198#002" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "One" + } + ], + "valueType": "xs:string", + "value": "john.doe@example.com", + "modelType": "Property" + }, + { + "idShort": "TypeOfEmailAddress", + "description": [ + { + "language": "en", + "text": "enumeration: 0173-1#07-AAS754#001 (office), 0173-1#07-AAS756#001 (secretary), 0173-1#07-AAS757#001 (substitute), 0173-1#07-AAS758#001 (home)" + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO199#003" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "valueType": "xs:string", + "value": "Work", + "modelType": "Property" + } + ], + "modelType": "SubmodelElementCollection" + }, + { + "idShort": "IPCommunication__00__", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToMany" + } + ], + "value": [ + { + "idShort": "AddressOfAdditionalLink", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAQ326#002" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "One" + }, + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://mm-software.com/twinengine/qualifier" + } + ] + }, + "kind": "TemplateQualifier", + "type": "InternalSemanticId", + "valueType": "xs:string", + "value": "https://mm-software.com/ipCommunication/AddressOfAdditionalLink" + } + ], + "valueType": "xs:string", + "value": "https://www.mm-software.com/more-the-newsroom/", + "modelType": "Property" + }, + { + "idShort": "TypeOfCommunication", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/ContactInformation/IPCommunication/TypeOfCommunication" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "valueType": "xs:string", + "value": "Chat", + "modelType": "Property" + }, + { + "idShort": "AvailableTime", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/ContactInformation/AvailableTime/" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + }, + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://mm-software.com/twinengine/qualifier" + } + ] + }, + "kind": "TemplateQualifier", + "type": "InternalSemanticId", + "valueType": "xs:string", + "value": "https://mm-software.com/IPCommunication/AvailableTime" + } + ], + "value": [ + { + "language": "de", + "text": "8:00 AM to 6:00 PM" + } + ], + "modelType": "MultiLanguageProperty" + } + ], + "modelType": "SubmodelElementCollection" + }, + { + "idShort": "Phone0", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/ContactInformation/Phone" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "value": [ + { + "idShort": "TelephoneNumber", + "description": [ + { + "language": "en", + "text": "Recommendation: property declaration as MLP is required by its semantic definition. As the property value is language independent, users are recommended to provide maximal 1 string in any language of the user’s choice." + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO136#002" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "One" + } + ], + "value": [ + { + "language": "en", + "text": "234-567-8901" + } + ], + "modelType": "MultiLanguageProperty" + }, + { + "idShort": "AvailableTime", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/ContactInformation/AvailableTime/" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + }, + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://mm-software.com/twinengine/qualifier" + } + ] + }, + "kind": "TemplateQualifier", + "type": "InternalSemanticId", + "valueType": "xs:string", + "value": "https://mm-software.com/Phone/AvailableTime" + } + ], + "value": [ + { + "language": "de", + "text": "Dienstags bis Donnerstags, 9-17 Uhr" + } + ], + "modelType": "MultiLanguageProperty" + }, + { + "idShort": "TypeOfTelephone", + "description": [ + { + "language": "en", + "text": " enumeration: 0173-1#07-AAS754#001 (office), 0173-1#07-AAS755#001 (office mobile), 0173-1#07-AAS756#001 (secretary), 0173-1#07-AAS757#001 (substitute), 0173-1#07-AAS758#001 (home), 0173-1#07-AAS759#001 (private mobile)" + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO137#003" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "valueType": "xs:string", + "value": "Office", + "modelType": "Property" + } + ], + "modelType": "SubmodelElementCollection" + }, + { + "idShort": "Phone1", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/ContactInformation/Phone" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "value": [ + { + "idShort": "TelephoneNumber", + "description": [ + { + "language": "en", + "text": "Recommendation: property declaration as MLP is required by its semantic definition. As the property value is language independent, users are recommended to provide maximal 1 string in any language of the user’s choice." + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO136#002" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "One" + } + ], + "value": [ + { + "language": "en", + "text": "345-678-9012" + } + ], + "modelType": "MultiLanguageProperty" + }, + { + "idShort": "AvailableTime", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/ContactInformation/AvailableTime/" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + }, + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://mm-software.com/twinengine/qualifier" + } + ] + }, + "kind": "TemplateQualifier", + "type": "InternalSemanticId", + "valueType": "xs:string", + "value": "https://mm-software.com/Phone/AvailableTime" + } + ], + "value": [ + { + "language": "de", + "text": "Montags, 10-16 Uhr" + } + ], + "modelType": "MultiLanguageProperty" + }, + { + "idShort": "TypeOfTelephone", + "description": [ + { + "language": "en", + "text": " enumeration: 0173-1#07-AAS754#001 (office), 0173-1#07-AAS755#001 (office mobile), 0173-1#07-AAS756#001 (secretary), 0173-1#07-AAS757#001 (substitute), 0173-1#07-AAS758#001 (home), 0173-1#07-AAS759#001 (private mobile)" + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO137#003" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "valueType": "xs:string", + "value": "Mobile", + "modelType": "Property" + } + ], + "modelType": "SubmodelElementCollection" + } + ], + "modelType": "SubmodelElementCollection" + }, + { + "idShort": "ContactInformation1", + "description": [ + { + "language": "en", + "text": "The SMC “ContactInformation” contains information on how to contact the manufacturer or an authorised service provider, e.g. when a maintenance service is required" + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/ContactInformation" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "OneToMany" + } + ], + "value": [ + { + "idShort": "RoleOfContactPerson", + "description": [ + { + "language": "en", + "text": "enumeration: 0173-1#07-AAS927#001 (administrativ contact), 0173-1#07-AAS928#001 (commercial contact), 0173-1#07-AAS929#001 (other contact), 0173-1#07-AAS930#001 (hazardous goods contact), 0173-1#07-AAS931#001 (technical contact). Note: the above mentioned ECLASS enumeration should be declared as “open” for further addition. ECLASS enumeration IRDI is preferable. If no IRDI available, custom input as String may also be accepted." + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO204#003" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "valueType": "xs:string", + "value": "Marketing Manager", + "modelType": "Property" + }, + { + "idShort": "AddressOfAdditionalLink", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAQ326#002" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + }, + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://mm-software.com/twinengine/qualifier" + } + ] + }, + "kind": "TemplateQualifier", + "type": "InternalSemanticId", + "valueType": "xs:string", + "value": "https://mm-software.com/AddressOfAdditionalLink" + } + ], + "valueType": "xs:string", + "value": "https://www.mm-software.com/more-the-newsroom/", + "modelType": "Property" + }, + { + "idShort": "Company", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAW001#001" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "value": [ + { + "language": "en", + "text": "Acme Corporation" + } + ], + "modelType": "MultiLanguageProperty" + }, + { + "idShort": "Department", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO127#003" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "value": [ + { + "language": "de", + "text": "Marketing" + } + ], + "modelType": "MultiLanguageProperty" + }, + { + "idShort": "Street", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO128#002" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "value": [ + { + "language": "de", + "text": "Bahnhofstraße 25" + } + ], + "modelType": "MultiLanguageProperty" + }, + { + "idShort": "Zipcode", + "description": [ + { + "language": "en", + "text": "Recommendation: property declaration as MLP is required by its semantic definition. As the property value is language independent, users are recommended to provide maximal 1 string in any language of the user’s choice." + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO129#002" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "value": [ + { + "language": "de", + "text": "80335" + } + ], + "modelType": "MultiLanguageProperty" + }, + { + "idShort": "StateCounty", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO133#002" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "value": [ + { + "language": "de", + "text": "Bayern" + } + ], + "modelType": "MultiLanguageProperty" + }, + { + "idShort": "NameOfContact", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO205#002" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "value": [ + { + "language": "en", + "text": "John Doe" + } + ], + "modelType": "MultiLanguageProperty" + }, + { + "idShort": "Email", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAQ836#005" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "value": [ + { + "idShort": "EmailAddress", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO198#002" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "One" + } + ], + "valueType": "xs:string", + "value": "john.doe@example.com", + "modelType": "Property" + }, + { + "idShort": "TypeOfEmailAddress", + "description": [ + { + "language": "en", + "text": "enumeration: 0173-1#07-AAS754#001 (office), 0173-1#07-AAS756#001 (secretary), 0173-1#07-AAS757#001 (substitute), 0173-1#07-AAS758#001 (home)" + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO199#003" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "valueType": "xs:string", + "value": "Work", + "modelType": "Property" + } + ], + "modelType": "SubmodelElementCollection" + }, + { + "idShort": "IPCommunication__00__", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToMany" + } + ], + "value": [ + { + "idShort": "AddressOfAdditionalLink", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAQ326#002" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "One" + }, + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://mm-software.com/twinengine/qualifier" + } + ] + }, + "kind": "TemplateQualifier", + "type": "InternalSemanticId", + "valueType": "xs:string", + "value": "https://mm-software.com/ipCommunication/AddressOfAdditionalLink" + } + ], + "valueType": "xs:string", + "value": "https://www.mm-software.com/more-the-newsroom/", + "modelType": "Property" + }, + { + "idShort": "TypeOfCommunication", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/ContactInformation/IPCommunication/TypeOfCommunication" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "valueType": "xs:string", + "value": "Chat", + "modelType": "Property" + }, + { + "idShort": "AvailableTime", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/ContactInformation/AvailableTime/" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + }, + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://mm-software.com/twinengine/qualifier" + } + ] + }, + "kind": "TemplateQualifier", + "type": "InternalSemanticId", + "valueType": "xs:string", + "value": "https://mm-software.com/IPCommunication/AvailableTime" + } + ], + "value": [ + { + "language": "de", + "text": "8:00 AM to 6:00 PM" + } + ], + "modelType": "MultiLanguageProperty" + } + ], + "modelType": "SubmodelElementCollection" + }, + { + "idShort": "Phone0", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/ContactInformation/Phone" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "value": [ + { + "idShort": "TelephoneNumber", + "description": [ + { + "language": "en", + "text": "Recommendation: property declaration as MLP is required by its semantic definition. As the property value is language independent, users are recommended to provide maximal 1 string in any language of the user’s choice." + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO136#002" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "One" + } + ], + "value": [ + { + "language": "en", + "text": "234-567-8901" + } + ], + "modelType": "MultiLanguageProperty" + }, + { + "idShort": "AvailableTime", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/ContactInformation/AvailableTime/" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + }, + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://mm-software.com/twinengine/qualifier" + } + ] + }, + "kind": "TemplateQualifier", + "type": "InternalSemanticId", + "valueType": "xs:string", + "value": "https://mm-software.com/Phone/AvailableTime" + } + ], + "value": [ + { + "language": "de", + "text": "Dienstags bis Donnerstags, 9-17 Uhr" + } + ], + "modelType": "MultiLanguageProperty" + }, + { + "idShort": "TypeOfTelephone", + "description": [ + { + "language": "en", + "text": " enumeration: 0173-1#07-AAS754#001 (office), 0173-1#07-AAS755#001 (office mobile), 0173-1#07-AAS756#001 (secretary), 0173-1#07-AAS757#001 (substitute), 0173-1#07-AAS758#001 (home), 0173-1#07-AAS759#001 (private mobile)" + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO137#003" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "valueType": "xs:string", + "value": "Office", + "modelType": "Property" + } + ], + "modelType": "SubmodelElementCollection" + }, + { + "idShort": "Phone1", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/ContactInformation/Phone" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "value": [ + { + "idShort": "TelephoneNumber", + "description": [ + { + "language": "en", + "text": "Recommendation: property declaration as MLP is required by its semantic definition. As the property value is language independent, users are recommended to provide maximal 1 string in any language of the user’s choice." + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO136#002" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "One" + } + ], + "value": [ + { + "language": "en", + "text": "345-678-9012" + } + ], + "modelType": "MultiLanguageProperty" + }, + { + "idShort": "AvailableTime", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/ContactInformation/AvailableTime/" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + }, + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://mm-software.com/twinengine/qualifier" + } + ] + }, + "kind": "TemplateQualifier", + "type": "InternalSemanticId", + "valueType": "xs:string", + "value": "https://mm-software.com/Phone/AvailableTime" + } + ], + "value": [ + { + "language": "de", + "text": "Montags, 10-16 Uhr" + } + ], + "modelType": "MultiLanguageProperty" + }, + { + "idShort": "TypeOfTelephone", + "description": [ + { + "language": "en", + "text": " enumeration: 0173-1#07-AAS754#001 (office), 0173-1#07-AAS755#001 (office mobile), 0173-1#07-AAS756#001 (secretary), 0173-1#07-AAS757#001 (substitute), 0173-1#07-AAS758#001 (home), 0173-1#07-AAS759#001 (private mobile)" + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO137#003" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "Multiplicity", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "valueType": "xs:string", + "value": "Mobile", + "modelType": "Property" + } + ], + "modelType": "SubmodelElementCollection" + } + ], + "modelType": "SubmodelElementCollection" + } + ], + "modelType": "Submodel" +} diff --git a/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/TestData/GetSubmodel_Nameplate_Expected.json b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/TestData/GetSubmodel_Nameplate_Expected.json new file mode 100644 index 0000000..4a5ed6c --- /dev/null +++ b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/TestData/GetSubmodel_Nameplate_Expected.json @@ -0,0 +1,1690 @@ +{ + "idShort": "Nameplate", + "description": [ + { + "language": "en", + "text": "Contains the nameplate information attached to the product" + } + ], + "administration": { + "version": "3", + "revision": "0" + }, + "id": "https://mm-software.com/submodel/000-001/Nameplate", + "kind": "Template", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/idta/nameplate/3/0/Nameplate" + } + ] + }, + "submodelElements": [ + { + "idShort": "URIOfTheProduct", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABN590#002" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-ABH173#003" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "One" + } + ], + "valueType": "xs:anyURI", + "value": "https://mm-software.com/Model-000/Serial-Nr-001", + "modelType": "Property" + }, + { + "idShort": "OrderCodeOfManufacturer", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABA950#008" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO227#004" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "One" + } + ], + "valueType": "xs:string", + "value": "FMABC1234", + "modelType": "Property" + }, + { + "idShort": "ProductArticleNumberOfManufacturer", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABA581#007" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO676#005" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "valueType": "xs:string", + "value": "MM11-ABC22-001", + "modelType": "Property" + }, + { + "idShort": "SerialNumber", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABA951#009" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAM556#004" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "valueType": "xs:string", + "value": "12345678", + "modelType": "Property" + }, + { + "idShort": "YearOfConstruction", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABP000#002" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAP906#003" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "valueType": "xs:string", + "value": "2022", + "modelType": "Property" + }, + { + "idShort": "DateOfManufacture", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABB757#007" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAR972#004" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "valueType": "xs:date", + "value": "2025-01-01", + "modelType": "Property" + }, + { + "idShort": "CountryOfOrigin", + "description": [ + { + "language": "en", + "text": "Note: Country codes defined accord. to DIN EN ISO 3166-1 alpha-2 codes" + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABP462#001" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO259#007" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "valueType": "xs:string", + "value": "DE", + "modelType": "Property" + }, + { + "idShort": "ManufacturerName", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABA565#009" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO677#004" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "One" + } + ], + "value": [ + { + "language": "de", + "text": "M&M" + } + ], + "modelType": "MultiLanguageProperty" + }, + { + "idShort": "ManufacturerProductDesignation", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABA567#009" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAW338#003" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "One" + } + ], + "value": [ + { + "language": "en", + "text": "\"ABC-123\"" + } + ], + "modelType": "MultiLanguageProperty" + }, + { + "idShort": "ManufacturerProductFamily", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABP464#002" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAU731#003" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "value": [ + { + "language": "en", + "text": "M&MType ABC" + } + ], + "modelType": "MultiLanguageProperty" + }, + { + "idShort": "CompanyLogo", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABP463#001" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-ABI776#002" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "value": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/bd4a1fca199e8a7c38fb20d3290f2a374b3d2ab8/example/logo/MM_Logo.svg", + "contentType": "image/png", + "modelType": "File" + }, + { + "idShort": "Markings", + "description": [ + { + "language": "en", + "text": "Note: CE marking is declared as mandatory according to EU Blue Guide" + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61360_7#AAS006#001" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-ABI563#003/0173-1#01-AHF849#003" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "orderRelevant": false, + "typeValueListElement": "SubmodelElementCollection", + "value": [ + { + "description": [ + { + "language": "en", + "text": "Note: CE marking is declared as mandatory according to the Blue Guide of the EU-Commission" + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61360_7#AAS009#001" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-ABI564#003/0173-1#01-AHF850#003" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "OneToMany" + } + ], + "value": [ + { + "idShort": "MarkingName", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABA231#009" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-ABI190#003" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "One" + } + ], + "valueType": "xs:string", + "value": "0173-1#07-DAA603#004", + "modelType": "Property" + }, + { + "idShort": "DesignationOfCertificateOrApproval", + "description": [ + { + "language": "en", + "text": "Note: Approval identifier, reference to the certificate number, to be entered without spaces " + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABH783#003" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-ABI975#002" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "valueType": "xs:string", + "value": "KEMA99IECEX1105/128", + "modelType": "Property" + }, + { + "idShort": "IssueDate", + "description": [ + { + "language": "en", + "text": "Note: format by lexical representation: CCYY-MM-DD Note: to be specified to the day " + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABO097#001" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-ABL774#001" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "valueType": "xs:date", + "value": "2022-01-01", + "modelType": "Property" + }, + { + "idShort": "ExpiryDate", + "description": [ + { + "language": "en", + "text": "Note: format by lexical representation: CCYY-MM-DD Note: to be specified to the day " + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABH830#002" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-ABL775#001" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "valueType": "xs:date", + "value": "2022-01-01", + "modelType": "Property" + }, + { + "idShort": "MarkingAdditionalText", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABB146#007" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-ABI192#003" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToMany" + } + ], + "valueType": "xs:string", + "value": "0044", + "modelType": "Property" + }, + { + "idShort": "MarkingFile", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABO100#002" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-ABI191#003" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "One" + } + ], + "value": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/refs/heads/main/example/data/checkmark.png", + "contentType": "image/png", + "modelType": "File" + } + ], + "modelType": "SubmodelElementCollection" + }, + { + "description": [ + { + "language": "en", + "text": "Note: CE marking is declared as mandatory according to the Blue Guide of the EU-Commission" + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61360_7#AAS009#001" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-ABI564#003/0173-1#01-AHF850#003" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "OneToMany" + } + ], + "value": [ + { + "idShort": "MarkingName", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABA231#009" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-ABI190#003" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "One" + } + ], + "valueType": "xs:string", + "value": "0173-1#07-DAA603#004-2", + "modelType": "Property" + }, + { + "idShort": "DesignationOfCertificateOrApproval", + "description": [ + { + "language": "en", + "text": "Note: Approval identifier, reference to the certificate number, to be entered without spaces " + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABH783#003" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-ABI975#002" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "valueType": "xs:string", + "value": "KEMA99IECEX1105/128-2", + "modelType": "Property" + }, + { + "idShort": "IssueDate", + "description": [ + { + "language": "en", + "text": "Note: format by lexical representation: CCYY-MM-DD Note: to be specified to the day " + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABO097#001" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-ABL774#001" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "valueType": "xs:date", + "value": "2025-01-01", + "modelType": "Property" + }, + { + "idShort": "ExpiryDate", + "description": [ + { + "language": "en", + "text": "Note: format by lexical representation: CCYY-MM-DD Note: to be specified to the day " + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABH830#002" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-ABL775#001" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "valueType": "xs:date", + "value": "2025-01-01", + "modelType": "Property" + }, + { + "idShort": "MarkingAdditionalText", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABB146#007" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-ABI192#003" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToMany" + } + ], + "valueType": "xs:string", + "value": "00100", + "modelType": "Property" + }, + { + "idShort": "MarkingFile", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABO100#002" + } + ] + }, + "supplementalSemanticIds": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-ABI191#003" + } + ] + } + ], + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "One" + } + ], + "value": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/refs/heads/main/example/data/checkmark.png", + "contentType": "image/png", + "modelType": "File" + } + ], + "modelType": "SubmodelElementCollection" + } + ], + "modelType": "SubmodelElementList" + }, + { + "idShort": "AssetSpecificProperties", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-ABI218#003/0173-1#01-AGZ672#004" + } + ] + }, + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "value": [ + { + "idShort": "ArbitraryProperty", + "description": [ + { + "language": "en", + "text": "Note: Every property can be used." + }, + { + "language": "en", + "text": "Note: The idShort is arbitrary" + }, + { + "language": "en", + "text": "Note: The use of a displayName is recommended." + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SMT/General/ArbitraryProp" + } + ] + }, + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToMany" + } + ], + "valueType": "xs:string", + "value": "", + "modelType": "Property" + }, + { + "idShort": "ArbitraryMLP", + "description": [ + { + "language": "en", + "text": "Note: Every multilanguage property can be used." + }, + { + "language": "en", + "text": "Note: The idShort is arbitrary" + }, + { + "language": "en", + "text": "Note: The use of a displayName is recommended." + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SMT/General/ArbitraryMLP" + } + ] + }, + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToMany" + }, + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://mm-software.com/twinengine/qualifier" + } + ] + }, + "kind": "TemplateQualifier", + "type": "InternalSemanticId", + "valueType": "xs:string", + "value": "https://mm-software.com/AssetSpecificProperties/ArbitraryMLP" + } + ], + "value": [ + { + "language": "en", + "text": "M&MTestsample" + } + ], + "modelType": "MultiLanguageProperty" + }, + { + "idShort": "ArbitraryFile", + "description": [ + { + "language": "en", + "text": "Note: Every file can be used." + }, + { + "language": "en", + "text": "The idShort is arbitrary" + }, + { + "language": "en", + "text": "Note: The use of a displayName is recommended." + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SMT/General/ArbitraryFile" + } + ] + }, + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToMany" + }, + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://mm-software.com/twinengine/qualifier" + } + ] + }, + "kind": "ConceptQualifier", + "type": "InternalSemanticId", + "valueType": "xs:string", + "value": "https://mm-software.com/AssetSpecificProperties/ArbitraryFile" + } + ], + "value": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/refs/heads/main/example/data/dummy_document.pdf", + "contentType": "application/pdf", + "modelType": "File" + }, + { + "idShort": "GuidelineSpecificProperties", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-ABI219#003/0173-1#01-AHD205#004" + } + ] + }, + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "orderRelevant": false, + "typeValueListElement": "SubmodelElementCollection", + "value": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#01-AHD205#004" + } + ] + }, + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "OneToMany" + } + ], + "value": [ + { + "idShort": "GuidelineForConformityDeclaration", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO856#002" + } + ] + }, + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "One" + } + ], + "valueType": "xs:string", + "value": "", + "modelType": "Property" + }, + { + "idShort": "ArbitraryProperty", + "description": [ + { + "language": "en", + "text": "Note: Every property can be used." + }, + { + "language": "en", + "text": "Note: The idShort is arbitrary" + }, + { + "language": "en", + "text": "Note: The use of a displayName is recommended." + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SMT/General/ArbitraryProp" + } + ] + }, + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToMany" + } + ], + "valueType": "xs:string", + "value": "", + "modelType": "Property" + }, + { + "idShort": "ArbitraryFile", + "description": [ + { + "language": "en", + "text": "Note: Every file can be used." + }, + { + "language": "en", + "text": "The idShort is arbitrary" + }, + { + "language": "en", + "text": "Note: The use of a displayName is recommended." + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SMT/General/ArbitraryFile" + } + ] + }, + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToMany" + }, + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://mm-software.com/twinengine/qualifier" + } + ] + }, + "kind": "ConceptQualifier", + "type": "InternalSemanticId", + "valueType": "xs:string", + "value": "https://mm-software.com/GuidelineSpecificProperties/ArbitraryFile" + } + ], + "value": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/refs/heads/main/example/data/checkmark.png", + "contentType": "image/png", + "modelType": "File" + }, + { + "idShort": "ArbitraryMLP", + "description": [ + { + "language": "en", + "text": "Note: Every multilanguage property can be used." + }, + { + "language": "en", + "text": "Note: The idShort is arbitrary" + }, + { + "language": "en", + "text": "Note: The use of a displayName is recommended." + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SMT/General/ArbitraryMLP" + } + ] + }, + "qualifiers": [ + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/SubmodelTemplates/Cardinality/1/0" + } + ] + }, + "kind": "TemplateQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToMany" + }, + { + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://mm-software.com/twinengine/qualifier" + } + ] + }, + "kind": "TemplateQualifier", + "type": "InternalSemanticId", + "valueType": "xs:string", + "value": "https://mm-software.com/GuidelineSpecificProperties/ArbitraryMLP" + } + ], + "value": [ + { + "language": "en", + "text": "\"sample\"" + } + ], + "modelType": "MultiLanguageProperty" + } + ], + "modelType": "SubmodelElementCollection" + } + ], + "modelType": "SubmodelElementList" + } + ], + "modelType": "SubmodelElementCollection" + } + ], + "modelType": "Submodel" +} diff --git a/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/TestData/GetSubmodel_Reliability_Expected.json b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/TestData/GetSubmodel_Reliability_Expected.json new file mode 100644 index 0000000..076e41e --- /dev/null +++ b/source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/TestData/GetSubmodel_Reliability_Expected.json @@ -0,0 +1,582 @@ +{ + "idShort": "Reliability", + "administration": { + "version": "1", + "revision": "0" + }, + "id": "https://mm-software.com/submodel/000-001/Reliability", + "kind": "Template", + "semanticId": { + "type": "ModelReference", + "keys": [ + { + "type": "Submodel", + "value": "https://admin-shell.io/idta/iec62683/1/0/Reliability" + } + ] + }, + "submodelElements": [ + { + "idShort": "NumberOfReliabilitySets", + "description": [ + { + "language": "en", + "text": "number of reliability sets of characteristics" + }, + { + "language": "fr", + "text": "nombre d'ensembles de caractéristiques de fiabilité" + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///62683#ACE006#001" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "One" + } + ], + "valueType": "xs:int", + "value": "4", + "modelType": "Property" + }, + { + "idShort": "OperatingConditionsOfReliabilityCharacteristics", + "description": [ + { + "language": "en", + "text": "operating conditions of reliability characteristics" + }, + { + "language": "fr", + "text": "conditions de fonctionnement des caractéristiques de fiabilité et de sécurité fonctionnelle" + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///62683#ACG071#001" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToMany" + } + ], + "value": [ + { + "idShort": "TypeOfVoltage", + "description": [ + { + "language": "en", + "text": "type of voltage" + }, + { + "language": "fr", + "text": "type de tension" + }, + { + "language": "de", + "text": "Spannungsart" + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABA969#007" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToMany" + } + ], + "valueType": "xs:string", + "value": "DC", + "valueId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABL837#001" + }, + { + "type": "GlobalReference", + "value": "0112/2///61987#ABL838#001" + }, + { + "type": "GlobalReference", + "value": "0112/2///61987#ABI407#004" + } + ] + }, + "modelType": "Property" + }, + { + "idShort": "RatedVoltage", + "description": [ + { + "language": "en", + "text": "rated voltage" + }, + { + "language": "fr", + "text": "tension assignée" + }, + { + "language": "de", + "text": "Bemessungsspannung" + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABA588#004" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToMany" + } + ], + "valueType": "xs:double", + "value": "14.8", + "modelType": "Property" + }, + { + "idShort": "MinimumRatedVoltage", + "description": [ + { + "language": "en", + "text": "minimum rated voltage" + }, + { + "language": "fr", + "text": "tension assignée minimale" + }, + { + "language": "de", + "text": "minimale Bemessungsspannung" + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABD461#004" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToMany" + } + ], + "valueType": "xs:double", + "value": "3.8", + "modelType": "Property" + }, + { + "idShort": "MaximumRatedVoltage", + "description": [ + { + "language": "en", + "text": "maximum rated voltage" + }, + { + "language": "fr", + "text": "tension assignée maximale" + }, + { + "language": "de", + "text": "maximale Bemessungsspannung" + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///61987#ABD462#004" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToMany" + } + ], + "valueType": "xs:double", + "value": "6.7", + "modelType": "Property" + }, + { + "idShort": "RatedOperationalCurrent", + "description": [ + { + "language": "en", + "text": "rated operational current" + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/idta/FunctionalSafety/RatedOperationalCurrent/1/0" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToMany" + } + ], + "valueType": "xs:double", + "value": "78.9", + "modelType": "Property" + }, + { + "idShort": "TypeOfInterlockingDevice", + "description": [ + { + "language": "en", + "text": "type of interlocking device" + }, + { + "language": "fr", + "text": "type de dispositif de verrouillage" + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///62683#ACE053#001" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToMany" + } + ], + "valueType": "xs:string", + "value": "TestType001", + "valueId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///62683#ACH673#001" + }, + { + "type": "GlobalReference", + "value": "0112/2///62683#ACH674#001" + }, + { + "type": "GlobalReference", + "value": "0112/2///62683#ACH675#001" + }, + { + "type": "GlobalReference", + "value": "0112/2///62683#ACH676#001" + } + ] + }, + "modelType": "Property" + }, + { + "idShort": "OtherOperatingConditions", + "description": [ + { + "language": "en", + "text": "other operating conditions" + }, + { + "language": "fr", + "text": "autres conditions de fonctionnement" + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///62683#ACE070#001" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToMany" + } + ], + "valueType": "xs:string", + "value": "true", + "modelType": "Property" + }, + { + "idShort": "UsefulLifeInNumberOfOperations", + "description": [ + { + "language": "en", + "text": "useful life in number of operations" + }, + { + "language": "fr", + "text": "durée de vie utile en cycle de fonctionnement" + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///62683#ACE055#001" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToMany" + } + ], + "valueType": "xs:double", + "value": "150", + "modelType": "Property" + }, + { + "idShort": "UsefulLifeInTimeInterval", + "description": [ + { + "language": "en", + "text": "useful life in time interval" + }, + { + "language": "fr", + "text": "durée de vie utile en intervalle de temps" + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///62683#ACE054#001" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToMany" + } + ], + "valueType": "xs:double", + "value": "45", + "modelType": "Property" + } + ], + "modelType": "SubmodelElementCollection" + }, + { + "idShort": "ReliabilityCharacteristics", + "description": [ + { + "language": "en", + "text": "Reliability characteristics" + }, + { + "language": "fr", + "text": "Caractéristiques de fiabilité" + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///62683#ACG080#001" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToOne" + } + ], + "value": [ + { + "idShort": "MTTF", + "description": [ + { + "language": "en", + "text": "mean operating time to failure" + }, + { + "language": "fr", + "text": "durée moyenne de fonctionnement avant défaillance" + }, + { + "language": "de", + "text": "mittlere Betriebszeit bis zum Ausfall" + }, + { + "language": "jp", + "text": "平均故障間動作時間" + }, + { + "language": "cn", + "text": "平均失效前工作时间" + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///62683#ACE061#001" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToMany" + } + ], + "valueType": "xs:int", + "value": "2", + "modelType": "Property" + }, + { + "idShort": "MTBF", + "description": [ + { + "language": "en", + "text": "mean operating time between failure" + }, + { + "language": "fr", + "text": "moyenne des temps de bon fonctionnement" + }, + { + "language": "de", + "text": "mittlere Betriebszeit zwischen Ausfällen" + }, + { + "language": "cn", + "text": "平均失效间隔工作时间" + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "0112/2///62683#ACE062#001" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToMany" + } + ], + "valueType": "xs:int", + "value": "7", + "modelType": "Property" + }, + { + "idShort": "B10cycle", + "description": [ + { + "language": "en", + "text": "B10" + } + ], + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/idta/Reliability/B10/1/0" + } + ] + }, + "qualifiers": [ + { + "kind": "ConceptQualifier", + "type": "SMT/Cardinality", + "valueType": "xs:string", + "value": "ZeroToMany" + } + ], + "valueType": "xs:int", + "value": "1", + "modelType": "Property" + } + ], + "modelType": "SubmodelElementCollection" + } + ], + "modelType": "Submodel" +}