diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index e1c12b5..5e6e4aa 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -71,9 +71,11 @@ jobs: latest=false tags: | type=semver,pattern={{raw}} + # Priority is set to ensure the develop-{{sha}} tag is preferred over other tags for the develop branch type=raw,value=develop-{{sha}},enable=${{startsWith(github.ref,'refs/heads/develop')}},priority=201 type=raw,value=develop,enable=${{startsWith(github.ref,'refs/heads/develop')}} type=raw,value=rc-{{branch}}-{{sha}},enable=${{startsWith(github.ref,'refs/heads/release/')}} + # The following tag is only applied to regular branches except 'develop' and 'release/*' (i.e., not for tags or PRs) type=raw,value={{branch}}-{{sha}},enable=${{startsWith(github.ref,'refs/heads/') && !startsWith(github.ref,'refs/heads/develop') && !startsWith(github.ref,'refs/heads/release/')}} type=ref,event=pr @@ -93,7 +95,6 @@ jobs: cache-from: type=gha cache-to: type=gha,mode=max - # Extract the pure application SBOM from the artifact stage, we want to handle it separately from the container SBOM # This automaticaly re-uses the previously generated stage from cache, so we get the exact sbom from previous build step - name: Export Application SBOM from artifact stage @@ -106,11 +107,13 @@ jobs: push: false outputs: type=local,dest=sbom-output - # Extract the first tag from the list for Trivy scanning - - name: Get first image tag + # Extract the tag with the highest priority from the list for Trivy scanning + - name: Get highest priority image tag if: ${{ github.event_name != 'pull_request' }} - id: first-tag - run: echo "value=$(echo '${{ steps.meta.outputs.tags }}' | head -n1)" >> $GITHUB_OUTPUT + id: highest-priority-tag + run: | + # The first tag in the list is the one with the highest priority + echo "value=$(echo '${{ steps.meta.outputs.tags }}' | head -n1)" >> $GITHUB_OUTPUT # Generate container SBOM. - name: Run Trivy in GitHub SBOM mode to generate CycloneDX SBOM for container @@ -120,8 +123,8 @@ jobs: scan-type: 'image' format: 'cyclonedx' output: 'sbom-output/sbom_container.cyclonedx.json' - image-ref: ${{ steps.first-tag.outputs.value }} - skip-dirs: '/App' # Skip the /app directory as we handle the content of the application in a seperate SBOM for easier vulnerability management and because trivy misses important fields + image-ref: ${{ steps.highest-priority-tag.outputs.value }} + skip-dirs: '/App' # Skip the /app directory as we handle the content of the application in a separate SBOM for easier vulnerability management and because trivy misses important fields - name: Upload trivy/container AND application SBOMs as a Github artifact if: ${{ github.event_name != 'pull_request' }} diff --git a/.github/workflows/playwright-tests.yml b/.github/workflows/playwright-tests.yml new file mode 100644 index 0000000..afa0270 --- /dev/null +++ b/.github/workflows/playwright-tests.yml @@ -0,0 +1,160 @@ +name: Playwright Tests + +on: + workflow_dispatch: + pull_request: + branches: + - 'main' + - 'develop' + - 'release/**' + - 'hotfix/**' + push: + branches: + - 'main' + - 'develop' + - 'release/**' + - 'hotfix/**' + +permissions: + contents: read + +env: + BUILD_CONFIGURATION: "Release" + SOLUTION_PATH: source/AAS.TwinEngine.DataEngine.sln + PLAYWRIGHT_TEST_PROJECT: source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests.csproj + DOCKER_COMPOSE_PATH: source/AAS.TwinEngine.Plugin.TestPlugin/Example + BASE_URL: "http://localhost:8085" + +jobs: + playwright-tests: + name: Run Playwright Tests + runs-on: ubuntu-latest + timeout-minutes: 30 + + permissions: + contents: read + checks: write + pull-requests: write + + steps: + - name: Checkout code + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + + - name: Setup .NET + uses: actions/setup-dotnet@2016bd2012dba4e32de620c46fe006a3ac9f0602 # v5.0.1 + with: + dotnet-version: "8.0.x" + + - name: Restore dependencies + run: dotnet restore ${{ env.SOLUTION_PATH }} --locked-mode + + - name: Build solution + run: dotnet build ${{ env.SOLUTION_PATH }} --configuration ${{ env.BUILD_CONFIGURATION }} --no-restore + + - name: Build Playwright test project + run: dotnet build ${{ env.PLAYWRIGHT_TEST_PROJECT }} --configuration ${{ env.BUILD_CONFIGURATION }} --no-restore + + - name: Start Docker Compose services + run: | + cd ${{ env.DOCKER_COMPOSE_PATH }} + docker compose up -d + env: + COMPOSE_HTTP_TIMEOUT: 200 + + - name: Wait for services to be healthy + run: | + cd ${{ env.DOCKER_COMPOSE_PATH }} + + echo "Waiting for services to be healthy..." + + MAX_WAIT=300 + ELAPSED=0 + INTERVAL=10 + + while [ $ELAPSED -lt $MAX_WAIT ]; do + # Check if all services are running + RUNNING=$(docker compose ps --status running --format json 2>/dev/null | jq -s 'length' 2>/dev/null || echo "0") + TOTAL=$(docker compose ps --format json 2>/dev/null | jq -s 'length' 2>/dev/null || echo "0") + + echo "Running containers: $RUNNING/$TOTAL" + + # Check for any unhealthy services + UNHEALTHY=$(docker compose ps --format json 2>/dev/null | jq -r 'select(.Health != "" and .Health != "healthy") | .Service' 2>/dev/null | wc -l) + + if [ $RUNNING -ge 6 ] && [ $UNHEALTHY -eq 0 ]; then + echo "Services are up and running!" + docker compose ps + break + fi + + echo "Waiting for services... ($ELAPSED/$MAX_WAIT seconds)" + sleep $INTERVAL + ELAPSED=$((ELAPSED + INTERVAL)) + done + + if [ $ELAPSED -ge $MAX_WAIT ]; then + echo "Timeout waiting for services to be ready" + echo "Current service status:" + docker compose ps + echo "Service logs:" + docker compose logs --tail=100 + exit 1 + fi + + # Additional wait to ensure services are fully ready + echo "Waiting additional 20 seconds for services to stabilize..." + sleep 20 + + # Verify critical endpoints are responding + echo "Checking DataEngine endpoint..." + for i in {1..15}; do + if curl -f -s -o /dev/null ${{ env.BASE_URL }}/shell-descriptors 2>&1; then + echo "DataEngine is responding!" + break + fi + if [ $i -eq 15 ]; then + echo "DataEngine is not responding after 15 attempts" + docker compose logs twinengine-dataengine --tail=50 + exit 1 + fi + echo "Attempt $i: DataEngine not ready yet..." + sleep 5 + done + + echo "All services are ready for testing!" + + - name: Show running containers + if: always() + run: | + cd ${{ env.DOCKER_COMPOSE_PATH }} + docker compose ps + echo "---" + docker compose logs --tail=50 + + - name: Run Playwright Tests + run: dotnet test ${{ env.PLAYWRIGHT_TEST_PROJECT }} --configuration ${{ env.BUILD_CONFIGURATION }} --no-build --logger "trx;LogFileName=playwright_test_results.trx" --verbosity normal + env: + BASE_URL: ${{ env.BASE_URL }} + + - name: Publish Test Results + uses: dorny/test-reporter@fe45e9537387dac839af0d33ba56eed8e24189e8 # v2.3.0 + if: always() + with: + name: Playwright Test Results + path: "**/playwright_test_results.trx" + reporter: dotnet-trx + fail-on-error: true + + - name: Capture Docker Compose Logs + if: always() + run: | + cd ${{ env.DOCKER_COMPOSE_PATH }} + mkdir -p logs + docker compose logs > logs/docker-compose-full.log 2>&1 || true + docker compose ps > logs/docker-compose-status.txt 2>&1 || true + + - name: Stop Docker Compose services + if: always() + run: | + cd ${{ env.DOCKER_COMPOSE_PATH }} + docker compose down -v diff --git a/example/README.md b/example/README.md index 6776b04..41df814 100644 --- a/example/README.md +++ b/example/README.md @@ -33,7 +33,6 @@ Before running the demonstrator, ensure you have installed: 1. **Clone or extract this repository:** ```bash git clone https://github.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine.git - cd AAS.TwinEngine.DataEngine ``` 2. **Go Inside example Folder** 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.DataEngine/Dockerfile b/source/AAS.TwinEngine.DataEngine/Dockerfile index 63b409d..c7a91b5 100644 --- a/source/AAS.TwinEngine.DataEngine/Dockerfile +++ b/source/AAS.TwinEngine.DataEngine/Dockerfile @@ -6,7 +6,7 @@ ENV PATH="$PATH:/root/.dotnet/tools" ARG BUILD_CONFIGURATION=Release WORKDIR /App COPY ["AAS.TwinEngine.DataEngine/", "AAS.TwinEngine.DataEngine/"] -RUN dotnet restore "AAS.TwinEngine.DataEngine/AAS.TwinEngine.DataEngine.csproj" +RUN dotnet restore "AAS.TwinEngine.DataEngine/AAS.TwinEngine.DataEngine.csproj" --locked-mode RUN dotnet publish "AAS.TwinEngine.DataEngine/AAS.TwinEngine.DataEngine.csproj" -c "$BUILD_CONFIGURATION" -o out # Generate Application SBOM at sbom/bom.xml (omitting dev/test dependencies as they do not appear in final build) RUN dotnet-CycloneDX "AAS.TwinEngine.DataEngine/AAS.TwinEngine.DataEngine.csproj" -o "sbom/" --exclude-dev --exclude-test-projects --set-nuget-purl --spec-version 1.6 --disable-package-restore diff --git a/source/AAS.TwinEngine.DataEngine/Infrastructure/Providers/AasRegistryProvider/Services/AasRegistryProvider.cs b/source/AAS.TwinEngine.DataEngine/Infrastructure/Providers/AasRegistryProvider/Services/AasRegistryProvider.cs index 3b8999d..32c36d1 100644 --- a/source/AAS.TwinEngine.DataEngine/Infrastructure/Providers/AasRegistryProvider/Services/AasRegistryProvider.cs +++ b/source/AAS.TwinEngine.DataEngine/Infrastructure/Providers/AasRegistryProvider/Services/AasRegistryProvider.cs @@ -112,12 +112,17 @@ private async Task SendGetRequestAndReadContentAsync(string url, Cancell private async Task SendRequestWithBodyAsync(HttpMethod method, string url, ShellDescriptor data, CancellationToken cancellationToken) { var client = clientFactory.CreateClient(HttpClientName); - var content = new StringContent(JsonSerializer.Serialize(data), Encoding.UTF8, "application/json"); + + var json = JsonSerializer.Serialize(data, JsonSerializationOptions.Serialization); + var content = new StringContent(json, Encoding.UTF8, "application/json"); logger.LogInformation("Sending HTTP {Method} request to {Url}", method, url); - using var request = new HttpRequestMessage(method, url); - request.Content = content; + using var request = new HttpRequestMessage(method, url) + { + Content = content + }; + var response = await client.SendAsync(request, cancellationToken).ConfigureAwait(false); await HandleResponseAsync(response, $"{method} ShellDescriptor", url, cancellationToken).ConfigureAwait(false); diff --git a/source/AAS.TwinEngine.DataEngine/Infrastructure/Shared/JsonSerializationOptions.cs b/source/AAS.TwinEngine.DataEngine/Infrastructure/Shared/JsonSerializationOptions.cs index 5b38e80..95c8c27 100644 --- a/source/AAS.TwinEngine.DataEngine/Infrastructure/Shared/JsonSerializationOptions.cs +++ b/source/AAS.TwinEngine.DataEngine/Infrastructure/Shared/JsonSerializationOptions.cs @@ -16,12 +16,11 @@ public static class JsonSerializationOptions public static readonly JsonSerializerOptions Serialization = new() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase, - WriteIndented = false + DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull }; public static readonly JsonSerializerOptions SerializationWithEnum = new() { - WriteIndented = false, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, Converters = { new JsonStringEnumConverter(JsonNamingPolicy.CamelCase) } }; 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" +} diff --git a/source/AAS.TwinEngine.Plugin.TestPlugin/Data/mock-metadata.json b/source/AAS.TwinEngine.Plugin.TestPlugin/Data/mock-metadata.json index 4d15e7b..f467cd0 100644 --- a/source/AAS.TwinEngine.Plugin.TestPlugin/Data/mock-metadata.json +++ b/source/AAS.TwinEngine.Plugin.TestPlugin/Data/mock-metadata.json @@ -7,7 +7,7 @@ "assetInformationData": { "defaultThumbnail": { "contentType": "image/jpeg", - "path": "https://cdn.pixabay.com/photo/2023/06/06/16/10/computer-8045026_1280.jpg" + "path": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/refs/heads/main/example/data/product1.jpg" } } }, @@ -19,7 +19,7 @@ "assetInformationData": { "defaultThumbnail": { "contentType": "image/jpeg", - "path": "https://cdn.pixabay.com/photo/2023/07/08/07/25/ai-generated-8113887_1280.jpg" + "path": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/refs/heads/main/example/data/product2.jpg" } } }, @@ -31,7 +31,7 @@ "assetInformationData": { "defaultThumbnail": { "contentType": "image/jpeg", - "path": "https://images.pexels.com/photos/27934787/pexels-photo-27934787.jpeg" + "path": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/refs/heads/main/example/data/product3.jpg" } } } diff --git a/source/AAS.TwinEngine.Plugin.TestPlugin/Data/mock-submodel-data.json b/source/AAS.TwinEngine.Plugin.TestPlugin/Data/mock-submodel-data.json index b0cb97b..a2c5366 100644 --- a/source/AAS.TwinEngine.Plugin.TestPlugin/Data/mock-submodel-data.json +++ b/source/AAS.TwinEngine.Plugin.TestPlugin/Data/mock-submodel-data.json @@ -38,7 +38,7 @@ ], "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/": [ { - "https://mm-software.com/ipCommunication/AddressOfAdditionalLink": "http://example.com/more-info", + "https://mm-software.com/ipCommunication/AddressOfAdditionalLink": "https://www.mm-software.com/more-the-newsroom/", "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/ContactInformation/IPCommunication/TypeOfCommunication": "Chat", "https://mm-software.com/IPCommunication/AvailableTime": { "https://mm-software.com/IPCommunication/AvailableTime_de": "8:00 AM to 6:00 PM" @@ -57,7 +57,7 @@ "0173-1#02-AAO205#002": { "0173-1#02-AAO205#002_en": "John Doe" }, - "https://mm-software.com/AddressOfAdditionalLink": "http://example.com/more-info" + "https://mm-software.com/AddressOfAdditionalLink": "https://www.mm-software.com/mobile-arbeitsmaschinen/" }, { "0173-1#02-AAO204#003": "Marketing Manager", @@ -95,7 +95,7 @@ ], "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/": [ { - "https://mm-software.com/ipCommunication/AddressOfAdditionalLink": "http://example.com/more-info", + "https://mm-software.com/ipCommunication/AddressOfAdditionalLink": "https://www.mm-software.com/more-the-newsroom/", "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/ContactInformation/IPCommunication/TypeOfCommunication": "Chat", "https://mm-software.com/IPCommunication/AvailableTime": { "https://mm-software.com/IPCommunication/AvailableTime_de": "8:00 AM to 6:00 PM" @@ -114,7 +114,7 @@ "0173-1#02-AAO205#002": { "0173-1#02-AAO205#002_en": "John Doe" }, - "https://mm-software.com/AddressOfAdditionalLink": "http://example.com/more-info" + "https://mm-software.com/AddressOfAdditionalLink": "https://www.mm-software.com/more-the-newsroom/" } ] } @@ -144,27 +144,35 @@ "0112/2///61987#ABH783#003": "KEMA99IECEX1105/128", "0112/2///61987#ABO097#001": "2022-01-01", "0112/2///61987#ABH830#002": "2022-01-01", - "0112/2///61987#ABO100#002": "file", + "0112/2///61987#ABO100#002": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/refs/heads/main/example/data/checkmark.png", "0112/2///61987#ABB146#007": "0044" + }, + { + "0112/2///61987#ABA231#009": "0173-1#07-DAA603#004-2", + "0112/2///61987#ABH783#003": "KEMA99IECEX1105/128-2", + "0112/2///61987#ABO097#001": "2025-01-01", + "0112/2///61987#ABH830#002": "2025-01-01", + "0112/2///61987#ABO100#002": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/refs/heads/main/example/data/checkmark.png01", + "0112/2///61987#ABB146#007": "00100" } ] } ], "0112/2///61987#ABP462#001": "DE", - "0112/2///61987#ABP463#001": "mm-logo", + "0112/2///61987#ABP463#001": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/bd4a1fca199e8a7c38fb20d3290f2a374b3d2ab8/example/logo/MM_Logo.svg", "0173-1#02-ABI218#003/0173-1#01-AGZ672#004": [ { "https://mm-software.com/AssetSpecificProperties/ArbitraryMLP": { "https://mm-software.com/AssetSpecificProperties/ArbitraryMLP_en": "M&MTestsample" }, - "https://mm-software.com/AssetSpecificProperties/ArbitraryFile": "sampleFile", + "https://mm-software.com/AssetSpecificProperties/ArbitraryFile": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/refs/heads/main/example/data/dummy_document.pdf", "0173-1#02-ABI219#003/0173-1#01-AHD205#004": [ { "0173-1#01-AHD205#004": [ { "0173-1#02-AAO856#002": "", "https://admin-shell.io/SMT/General/ArbitraryProp": "", - "https://mm-software.com/GuidelineSpecificProperties/ArbitraryFile": "TestFile", + "https://mm-software.com/GuidelineSpecificProperties/ArbitraryFile": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/refs/heads/main/example/data/checkmark.png", "https://mm-software.com/GuidelineSpecificProperties/ArbitraryMLP": { "https://mm-software.com/GuidelineSpecificProperties/ArbitraryMLP_en": "\u0022sample\u0022" } @@ -240,7 +248,7 @@ ], "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/": [ { - "https://mm-software.com/ipCommunication/AddressOfAdditionalLink": "http://example.com/more-info", + "https://mm-software.com/ipCommunication/AddressOfAdditionalLink": "https://www.mm-software.com/more-the-newsroom/", "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/ContactInformation/IPCommunication/TypeOfCommunication": "Chat", "https://mm-software.com/IPCommunication/AvailableTime": { "https://mm-software.com/IPCommunication/AvailableTime_de": "8:00 AM to 6:00 PM" @@ -259,7 +267,7 @@ "0173-1#02-AAO205#002": { "0173-1#02-AAO205#002_en": "John Doe" }, - "https://mm-software.com/AddressOfAdditionalLink": "http://example.com/more-info" + "https://mm-software.com/AddressOfAdditionalLink": "https://www.mm-software.com/more-the-newsroom/" }, { "0173-1#02-AAO204#003": "Assistant Manager", @@ -288,7 +296,7 @@ ], "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/": [ { - "https://mm-software.com/ipCommunication/AddressOfAdditionalLink": "http://example.com/more-info2", + "https://mm-software.com/ipCommunication/AddressOfAdditionalLink": "https://www.mm-software.com/more-the-newsroom/2", "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/ContactInformation/IPCommunication/TypeOfCommunication": "Email", "https://mm-software.com/IPCommunication/AvailableTime": { "https://mm-software.com/IPCommunication/AvailableTime_de": "9:00 AM to 5:00 PM" @@ -307,7 +315,7 @@ "0173-1#02-AAO205#002": { "0173-1#02-AAO205#002_en": "Jane Doe" }, - "https://mm-software.com/AddressOfAdditionalLink": "http://example.com/info2" + "https://mm-software.com/AddressOfAdditionalLink": "https://www.mm-software.com/" } ] } @@ -337,27 +345,27 @@ "0112/2///61987#ABH783#003": "KEMA99IECEX1105/128", "0112/2///61987#ABO097#001": "2022-01-01", "0112/2///61987#ABH830#002": "2022-01-01", - "0112/2///61987#ABO100#002": "file", + "0112/2///61987#ABO100#002": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/refs/heads/main/example/data/checkmark.png", "0112/2///61987#ABB146#007": "0044" } ] } ], "0112/2///61987#ABP462#001": "DE", - "0112/2///61987#ABP463#001": "mm-logo", + "0112/2///61987#ABP463#001": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/bd4a1fca199e8a7c38fb20d3290f2a374b3d2ab8/example/logo/MM_Logo.svg", "0173-1#02-ABI218#003/0173-1#01-AGZ672#004": [ { "https://mm-software.com/AssetSpecificProperties/ArbitraryMLP": { "https://mm-software.com/AssetSpecificProperties/ArbitraryMLP_en": "M&MTestsample" }, - "https://mm-software.com/AssetSpecificProperties/ArbitraryFile": "sampleFile", + "https://mm-software.com/AssetSpecificProperties/ArbitraryFile": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/refs/heads/main/example/data/dummy_document.pdf", "0173-1#02-ABI219#003/0173-1#01-AHD205#004": [ { "0173-1#01-AHD205#004": [ { "0173-1#02-AAO856#002": "", "https://admin-shell.io/SMT/General/ArbitraryProp": "", - "https://mm-software.com/GuidelineSpecificProperties/ArbitraryFile": "TestFile", + "https://mm-software.com/GuidelineSpecificProperties/ArbitraryFile": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/refs/heads/main/example/data/checkmark.png", "https://mm-software.com/GuidelineSpecificProperties/ArbitraryMLP": { "https://mm-software.com/GuidelineSpecificProperties/ArbitraryMLP_en": "\u0022sample\u0022" } @@ -433,7 +441,7 @@ ], "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/": [ { - "https://mm-software.com/ipCommunication/AddressOfAdditionalLink": "http://example.com/more-info", + "https://mm-software.com/ipCommunication/AddressOfAdditionalLink": "https://www.mm-software.com/more-the-newsroom/", "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/ContactInformation/IPCommunication/TypeOfCommunication": "Chat", "https://mm-software.com/IPCommunication/AvailableTime": { "https://mm-software.com/IPCommunication/AvailableTime_de": "8:00 AM to 6:00 PM" @@ -452,7 +460,7 @@ "0173-1#02-AAO205#002": { "0173-1#02-AAO205#002_en": "John Doe" }, - "https://mm-software.com/AddressOfAdditionalLink": "http://example.com/more-info" + "https://mm-software.com/AddressOfAdditionalLink": "https://www.mm-software.com/more-the-newsroom/" }, { "0173-1#02-AAO204#003": "Manager", @@ -490,7 +498,7 @@ ], "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/": [ { - "https://mm-software.com/ipCommunication/AddressOfAdditionalLink": "http://example.com/more-info", + "https://mm-software.com/ipCommunication/AddressOfAdditionalLink": "https://www.mm-software.com/more-the-newsroom/", "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/ContactInformation/IPCommunication/TypeOfCommunication": "Chat", "https://mm-software.com/IPCommunication/AvailableTime": { "https://mm-software.com/IPCommunication/AvailableTime_de": "8:00 AM to 6:00 PM" @@ -509,7 +517,7 @@ "0173-1#02-AAO205#002": { "0173-1#02-AAO205#002_en": "John Doe" }, - "https://mm-software.com/AddressOfAdditionalLink": "http://example.com/more-info" + "https://mm-software.com/AddressOfAdditionalLink": "https://www.mm-software.com/more-the-newsroom/" }, { "0173-1#02-AAO204#003": "Assistant Manager", @@ -538,7 +546,7 @@ ], "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/": [ { - "https://mm-software.com/ipCommunication/AddressOfAdditionalLink": "http://example.com/more-info2", + "https://mm-software.com/ipCommunication/AddressOfAdditionalLink": "https://www.mm-software.com/more-the-newsroom/2", "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/ContactInformation/IPCommunication/TypeOfCommunication": "Email", "https://mm-software.com/IPCommunication/AvailableTime": { "https://mm-software.com/IPCommunication/AvailableTime_de": "9:00 AM to 5:00 PM" @@ -557,7 +565,7 @@ "0173-1#02-AAO205#002": { "0173-1#02-AAO205#002_en": "Jane Doe" }, - "https://mm-software.com/AddressOfAdditionalLink": "http://example.com/info2" + "https://mm-software.com/AddressOfAdditionalLink": "https://www.mm-software.com/" } ] } @@ -584,7 +592,7 @@ "0112/2///61987#ABH783#003": "KEMA99IECEX1105/128", "0112/2///61987#ABO097#001": "2022-01-01", "0112/2///61987#ABH830#002": "2022-01-01", - "0112/2///61987#ABO100#002": "file", + "0112/2///61987#ABO100#002": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/refs/heads/main/example/data/checkmark.png", "0112/2///61987#ABB146#007": "0044" } ] @@ -595,20 +603,20 @@ "0112/2///61987#ABP000#002": "2022", "0112/2///61987#ABB757#007": "2022-01-01", "0112/2///61987#ABP462#001": "DE", - "0112/2///61987#ABP463#001": "mm-logo", + "0112/2///61987#ABP463#001": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/bd4a1fca199e8a7c38fb20d3290f2a374b3d2ab8/example/logo/MM_Logo.svg", "0173-1#02-ABI218#003/0173-1#01-AGZ672#004": [ { "https://mm-software.com/AssetSpecificProperties/ArbitraryMLP": { "https://mm-software.com/AssetSpecificProperties/ArbitraryMLP_en": "\u0022sample\u0022" }, - "https://mm-software.com/AssetSpecificProperties/ArbitraryFile": "sampleFile", + "https://mm-software.com/AssetSpecificProperties/ArbitraryFile": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/refs/heads/main/example/data/dummy_document.pdf", "0173-1#02-ABI219#003/0173-1#01-AHD205#004": [ { "0173-1#01-AHD205#004": [ { "0173-1#02-AAO856#002": "", "https://admin-shell.io/SMT/General/ArbitraryProp": "", - "https://mm-software.com/GuidelineSpecificProperties/ArbitraryFile": "TestFile", + "https://mm-software.com/GuidelineSpecificProperties/ArbitraryFile": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/refs/heads/main/example/data/checkmark.png", "https://mm-software.com/GuidelineSpecificProperties/ArbitraryMLP": { "https://mm-software.com/GuidelineSpecificProperties/ArbitraryMLP_en": "\u0022sample\u0022" } diff --git a/source/AAS.TwinEngine.Plugin.TestPlugin/Dockerfile b/source/AAS.TwinEngine.Plugin.TestPlugin/Dockerfile index f711db5..852f4f3 100644 --- a/source/AAS.TwinEngine.Plugin.TestPlugin/Dockerfile +++ b/source/AAS.TwinEngine.Plugin.TestPlugin/Dockerfile @@ -2,7 +2,7 @@ FROM mcr.microsoft.com/dotnet/sdk:8.0@sha256:aa05b91be697b83229cb000b90120f07836 ARG BUILD_CONFIGURATION=Release WORKDIR /App COPY ["AAS.TwinEngine.Plugin.TestPlugin/", "AAS.TwinEngine.Plugin.TestPlugin/"] -RUN dotnet restore "AAS.TwinEngine.Plugin.TestPlugin/AAS.TwinEngine.Plugin.TestPlugin.csproj" +RUN dotnet restore "AAS.TwinEngine.Plugin.TestPlugin/AAS.TwinEngine.Plugin.TestPlugin.csproj" --locked-mode RUN dotnet publish "AAS.TwinEngine.Plugin.TestPlugin/AAS.TwinEngine.Plugin.TestPlugin.csproj" -c "$BUILD_CONFIGURATION" -o out FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine@sha256:a0ce42fe86548363a9602c47fc3bd4cf9c35a2705c68cd98d7ce18ae8735b83c diff --git a/source/AAS.TwinEngine.Plugin.TestPlugin/Example/docker-compose.yml b/source/AAS.TwinEngine.Plugin.TestPlugin/Example/docker-compose.yml index a4a0ae1..7311d9b 100644 --- a/source/AAS.TwinEngine.Plugin.TestPlugin/Example/docker-compose.yml +++ b/source/AAS.TwinEngine.Plugin.TestPlugin/Example/docker-compose.yml @@ -163,8 +163,8 @@ services: CD_REPO_PATH: http://localhost:8080/concept-descriptions BASE_PATH: "/aas-ui" LOGO_PATH: "MM_Logo.svg" - PRIMARY_DARK_COLOR: "#EBECED" - PRIMARY_LIGHT_COLOR: "#00F2E5" + PRIMARY_DARK_COLOR: "#00F2E5" + PRIMARY_LIGHT_COLOR: "#041b2b" restart: always depends_on: template-repository: diff --git a/source/AAS.TwinEngine.Plugin.TestPlugin/Example/plugin/mock-metadata.json b/source/AAS.TwinEngine.Plugin.TestPlugin/Example/plugin/mock-metadata.json index 4d15e7b..f467cd0 100644 --- a/source/AAS.TwinEngine.Plugin.TestPlugin/Example/plugin/mock-metadata.json +++ b/source/AAS.TwinEngine.Plugin.TestPlugin/Example/plugin/mock-metadata.json @@ -7,7 +7,7 @@ "assetInformationData": { "defaultThumbnail": { "contentType": "image/jpeg", - "path": "https://cdn.pixabay.com/photo/2023/06/06/16/10/computer-8045026_1280.jpg" + "path": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/refs/heads/main/example/data/product1.jpg" } } }, @@ -19,7 +19,7 @@ "assetInformationData": { "defaultThumbnail": { "contentType": "image/jpeg", - "path": "https://cdn.pixabay.com/photo/2023/07/08/07/25/ai-generated-8113887_1280.jpg" + "path": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/refs/heads/main/example/data/product2.jpg" } } }, @@ -31,7 +31,7 @@ "assetInformationData": { "defaultThumbnail": { "contentType": "image/jpeg", - "path": "https://images.pexels.com/photos/27934787/pexels-photo-27934787.jpeg" + "path": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/refs/heads/main/example/data/product3.jpg" } } } diff --git a/source/AAS.TwinEngine.Plugin.TestPlugin/Example/plugin/mock-submodel-data.json b/source/AAS.TwinEngine.Plugin.TestPlugin/Example/plugin/mock-submodel-data.json index 1a5cdf4..b085e15 100644 --- a/source/AAS.TwinEngine.Plugin.TestPlugin/Example/plugin/mock-submodel-data.json +++ b/source/AAS.TwinEngine.Plugin.TestPlugin/Example/plugin/mock-submodel-data.json @@ -38,7 +38,7 @@ ], "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/": [ { - "https://mm-software.com/ipCommunication/AddressOfAdditionalLink": "http://example.com/more-info", + "https://mm-software.com/ipCommunication/AddressOfAdditionalLink": "https://www.mm-software.com/more-the-newsroom/", "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/ContactInformation/IPCommunication/TypeOfCommunication": "Chat", "https://mm-software.com/IPCommunication/AvailableTime": { "https://mm-software.com/IPCommunication/AvailableTime_de": "8:00 AM to 6:00 PM" @@ -57,7 +57,7 @@ "0173-1#02-AAO205#002": { "0173-1#02-AAO205#002_en": "John Doe" }, - "https://mm-software.com/AddressOfAdditionalLink": "http://example.com/more-info" + "https://mm-software.com/AddressOfAdditionalLink": "https://www.mm-software.com/mobile-arbeitsmaschinen/" }, { "0173-1#02-AAO204#003": "Marketing Manager", @@ -95,7 +95,7 @@ ], "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/": [ { - "https://mm-software.com/ipCommunication/AddressOfAdditionalLink": "http://example.com/more-info", + "https://mm-software.com/ipCommunication/AddressOfAdditionalLink": "https://www.mm-software.com/more-the-newsroom/", "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/ContactInformation/IPCommunication/TypeOfCommunication": "Chat", "https://mm-software.com/IPCommunication/AvailableTime": { "https://mm-software.com/IPCommunication/AvailableTime_de": "8:00 AM to 6:00 PM" @@ -114,7 +114,7 @@ "0173-1#02-AAO205#002": { "0173-1#02-AAO205#002_en": "John Doe" }, - "https://mm-software.com/AddressOfAdditionalLink": "http://example.com/more-info" + "https://mm-software.com/AddressOfAdditionalLink": "https://www.mm-software.com/more-the-newsroom/" } ] } @@ -144,7 +144,7 @@ "0112/2///61987#ABH783#003": "KEMA99IECEX1105/128", "0112/2///61987#ABO097#001": "2022-01-01", "0112/2///61987#ABH830#002": "2022-01-01", - "0112/2///61987#ABO100#002": "file", + "0112/2///61987#ABO100#002": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/refs/heads/main/example/data/checkmark.png", "0112/2///61987#ABB146#007": "0044" }, { @@ -152,27 +152,27 @@ "0112/2///61987#ABH783#003": "KEMA99IECEX1105/128-2", "0112/2///61987#ABO097#001": "2025-01-01", "0112/2///61987#ABH830#002": "2025-01-01", - "0112/2///61987#ABO100#002": "file01", + "0112/2///61987#ABO100#002": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/refs/heads/main/example/data/checkmark.png", "0112/2///61987#ABB146#007": "00100" } ] } ], "0112/2///61987#ABP462#001": "DE", - "0112/2///61987#ABP463#001": "mm-logo", + "0112/2///61987#ABP463#001": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/bd4a1fca199e8a7c38fb20d3290f2a374b3d2ab8/example/logo/MM_Logo.svg", "0173-1#02-ABI218#003/0173-1#01-AGZ672#004": [ { "https://mm-software.com/AssetSpecificProperties/ArbitraryMLP": { "https://mm-software.com/AssetSpecificProperties/ArbitraryMLP_en": "M&MTestsample" }, - "https://mm-software.com/AssetSpecificProperties/ArbitraryFile": "sampleFile", + "https://mm-software.com/AssetSpecificProperties/ArbitraryFile": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/refs/heads/main/example/data/dummy_document.pdf", "0173-1#02-ABI219#003/0173-1#01-AHD205#004": [ { "0173-1#01-AHD205#004": [ { "0173-1#02-AAO856#002": "", "https://admin-shell.io/SMT/General/ArbitraryProp": "", - "https://mm-software.com/GuidelineSpecificProperties/ArbitraryFile": "TestFile", + "https://mm-software.com/GuidelineSpecificProperties/ArbitraryFile": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/refs/heads/main/example/data/checkmark.png", "https://mm-software.com/GuidelineSpecificProperties/ArbitraryMLP": { "https://mm-software.com/GuidelineSpecificProperties/ArbitraryMLP_en": "\u0022sample\u0022" } @@ -248,7 +248,7 @@ ], "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/": [ { - "https://mm-software.com/ipCommunication/AddressOfAdditionalLink": "http://example.com/more-info", + "https://mm-software.com/ipCommunication/AddressOfAdditionalLink": "https://www.mm-software.com/more-the-newsroom/", "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/ContactInformation/IPCommunication/TypeOfCommunication": "Chat", "https://mm-software.com/IPCommunication/AvailableTime": { "https://mm-software.com/IPCommunication/AvailableTime_de": "8:00 AM to 6:00 PM" @@ -267,7 +267,7 @@ "0173-1#02-AAO205#002": { "0173-1#02-AAO205#002_en": "John Doe" }, - "https://mm-software.com/AddressOfAdditionalLink": "http://example.com/more-info" + "https://mm-software.com/AddressOfAdditionalLink": "https://www.mm-software.com/more-the-newsroom/" }, { "0173-1#02-AAO204#003": "Assistant Manager", @@ -296,7 +296,7 @@ ], "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/": [ { - "https://mm-software.com/ipCommunication/AddressOfAdditionalLink": "http://example.com/more-info2", + "https://mm-software.com/ipCommunication/AddressOfAdditionalLink": "https://www.mm-software.com/more-the-newsroom/2", "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/ContactInformation/IPCommunication/TypeOfCommunication": "Email", "https://mm-software.com/IPCommunication/AvailableTime": { "https://mm-software.com/IPCommunication/AvailableTime_de": "9:00 AM to 5:00 PM" @@ -315,7 +315,7 @@ "0173-1#02-AAO205#002": { "0173-1#02-AAO205#002_en": "Jane Doe" }, - "https://mm-software.com/AddressOfAdditionalLink": "http://example.com/info2" + "https://mm-software.com/AddressOfAdditionalLink": "https://www.mm-software.com/" } ] } @@ -345,27 +345,27 @@ "0112/2///61987#ABH783#003": "KEMA99IECEX1105/128", "0112/2///61987#ABO097#001": "2022-01-01", "0112/2///61987#ABH830#002": "2022-01-01", - "0112/2///61987#ABO100#002": "file", + "0112/2///61987#ABO100#002": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/refs/heads/main/example/data/checkmark.png", "0112/2///61987#ABB146#007": "0044" } ] } ], "0112/2///61987#ABP462#001": "DE", - "0112/2///61987#ABP463#001": "mm-logo", + "0112/2///61987#ABP463#001": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/bd4a1fca199e8a7c38fb20d3290f2a374b3d2ab8/example/logo/MM_Logo.svg", "0173-1#02-ABI218#003/0173-1#01-AGZ672#004": [ { "https://mm-software.com/AssetSpecificProperties/ArbitraryMLP": { "https://mm-software.com/AssetSpecificProperties/ArbitraryMLP_en": "M&MTestsample" }, - "https://mm-software.com/AssetSpecificProperties/ArbitraryFile": "sampleFile", + "https://mm-software.com/AssetSpecificProperties/ArbitraryFile": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/refs/heads/main/example/data/dummy_document.pdf", "0173-1#02-ABI219#003/0173-1#01-AHD205#004": [ { "0173-1#01-AHD205#004": [ { "0173-1#02-AAO856#002": "", "https://admin-shell.io/SMT/General/ArbitraryProp": "", - "https://mm-software.com/GuidelineSpecificProperties/ArbitraryFile": "TestFile", + "https://mm-software.com/GuidelineSpecificProperties/ArbitraryFile": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/refs/heads/main/example/data/checkmark.png", "https://mm-software.com/GuidelineSpecificProperties/ArbitraryMLP": { "https://mm-software.com/GuidelineSpecificProperties/ArbitraryMLP_en": "\u0022sample\u0022" } @@ -441,7 +441,7 @@ ], "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/": [ { - "https://mm-software.com/ipCommunication/AddressOfAdditionalLink": "http://example.com/more-info", + "https://mm-software.com/ipCommunication/AddressOfAdditionalLink": "https://www.mm-software.com/more-the-newsroom/", "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/ContactInformation/IPCommunication/TypeOfCommunication": "Chat", "https://mm-software.com/IPCommunication/AvailableTime": { "https://mm-software.com/IPCommunication/AvailableTime_de": "8:00 AM to 6:00 PM" @@ -460,7 +460,7 @@ "0173-1#02-AAO205#002": { "0173-1#02-AAO205#002_en": "John Doe" }, - "https://mm-software.com/AddressOfAdditionalLink": "http://example.com/more-info" + "https://mm-software.com/AddressOfAdditionalLink": "https://www.mm-software.com/more-the-newsroom/" }, { "0173-1#02-AAO204#003": "Manager", @@ -498,7 +498,7 @@ ], "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/": [ { - "https://mm-software.com/ipCommunication/AddressOfAdditionalLink": "http://example.com/more-info", + "https://mm-software.com/ipCommunication/AddressOfAdditionalLink": "https://www.mm-software.com/more-the-newsroom/", "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/ContactInformation/IPCommunication/TypeOfCommunication": "Chat", "https://mm-software.com/IPCommunication/AvailableTime": { "https://mm-software.com/IPCommunication/AvailableTime_de": "8:00 AM to 6:00 PM" @@ -517,7 +517,7 @@ "0173-1#02-AAO205#002": { "0173-1#02-AAO205#002_en": "John Doe" }, - "https://mm-software.com/AddressOfAdditionalLink": "http://example.com/more-info" + "https://mm-software.com/AddressOfAdditionalLink": "https://www.mm-software.com/more-the-newsroom/" }, { "0173-1#02-AAO204#003": "Assistant Manager", @@ -546,7 +546,7 @@ ], "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/": [ { - "https://mm-software.com/ipCommunication/AddressOfAdditionalLink": "http://example.com/more-info2", + "https://mm-software.com/ipCommunication/AddressOfAdditionalLink": "https://www.mm-software.com/more-the-newsroom/2", "https://admin-shell.io/zvei/nameplate/1/0/ContactInformations/ContactInformation/IPCommunication/TypeOfCommunication": "Email", "https://mm-software.com/IPCommunication/AvailableTime": { "https://mm-software.com/IPCommunication/AvailableTime_de": "9:00 AM to 5:00 PM" @@ -565,7 +565,7 @@ "0173-1#02-AAO205#002": { "0173-1#02-AAO205#002_en": "Jane Doe" }, - "https://mm-software.com/AddressOfAdditionalLink": "http://example.com/info2" + "https://mm-software.com/AddressOfAdditionalLink": "https://www.mm-software.com/" } ] } @@ -592,7 +592,7 @@ "0112/2///61987#ABH783#003": "KEMA99IECEX1105/128", "0112/2///61987#ABO097#001": "2022-01-01", "0112/2///61987#ABH830#002": "2022-01-01", - "0112/2///61987#ABO100#002": "file", + "0112/2///61987#ABO100#002": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/refs/heads/main/example/data/checkmark.png", "0112/2///61987#ABB146#007": "0044" } ] @@ -603,20 +603,20 @@ "0112/2///61987#ABP000#002": "2022", "0112/2///61987#ABB757#007": "2022-01-01", "0112/2///61987#ABP462#001": "DE", - "0112/2///61987#ABP463#001": "mm-logo", + "0112/2///61987#ABP463#001": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/bd4a1fca199e8a7c38fb20d3290f2a374b3d2ab8/example/logo/MM_Logo.svg", "0173-1#02-ABI218#003/0173-1#01-AGZ672#004": [ { "https://mm-software.com/AssetSpecificProperties/ArbitraryMLP": { "https://mm-software.com/AssetSpecificProperties/ArbitraryMLP_en": "\u0022sample\u0022" }, - "https://mm-software.com/AssetSpecificProperties/ArbitraryFile": "sampleFile", + "https://mm-software.com/AssetSpecificProperties/ArbitraryFile": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/refs/heads/main/example/data/dummy_document.pdf", "0173-1#02-ABI219#003/0173-1#01-AHD205#004": [ { "0173-1#01-AHD205#004": [ { "0173-1#02-AAO856#002": "", "https://admin-shell.io/SMT/General/ArbitraryProp": "", - "https://mm-software.com/GuidelineSpecificProperties/ArbitraryFile": "TestFile", + "https://mm-software.com/GuidelineSpecificProperties/ArbitraryFile": "https://raw.githubusercontent.com/AAS-TwinEngine/AAS.TwinEngine.DataEngine/refs/heads/main/example/data/checkmark.png", "https://mm-software.com/GuidelineSpecificProperties/ArbitraryMLP": { "https://mm-software.com/GuidelineSpecificProperties/ArbitraryMLP_en": "\u0022sample\u0022" }