From bc370b50dcbed21dfed2085d03b688d331bae948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20J=C3=B8rgen=20Skogstad?= Date: Wed, 26 Feb 2025 11:36:06 +0100 Subject: [PATCH] test --- .github/workflows/workflow-build-and-test.yml | 21 +++++++++++++++++++ .../workflows/workflow-check-for-changes.yml | 6 ++++++ docs/schema/V1/swagger.verified.json | 2 +- .../V1/Common/Content/ContentValueDto.cs | 2 +- 4 files changed, 29 insertions(+), 2 deletions(-) diff --git a/.github/workflows/workflow-build-and-test.yml b/.github/workflows/workflow-build-and-test.yml index 44f343145..14a8b6e33 100644 --- a/.github/workflows/workflow-build-and-test.yml +++ b/.github/workflows/workflow-build-and-test.yml @@ -5,6 +5,27 @@ on: workflow_call: jobs: + check-for-changes: + name: Check for changes + uses: ./.github/workflows/workflow-check-for-changes.yml + + check-refitter-swagger-sync: + needs: [ check-for-changes ] + if: ${{ needs.check-for-changes.outputs.hasSwaggerSchemaChanges == 'true' && needs.check-for-changes.outputs.hasWebApiClientRefitterInterfaceChanges != 'true' }} + runs-on: ubuntu-latest + name: Check refitter swagger sync + steps: + - uses: actions/github-script@v7 + with: + github-token: ${{secrets.GITHUB_TOKEN}} + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: 'OpenAPI spec has changed, but the WebAPI SDK Refitter interface has not, did you forget to rebuild WebAPI?' + }) + build-and-test: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/workflow-check-for-changes.yml b/.github/workflows/workflow-check-for-changes.yml index dcbf6e31b..056933918 100644 --- a/.github/workflows/workflow-check-for-changes.yml +++ b/.github/workflows/workflow-check-for-changes.yml @@ -23,6 +23,9 @@ on: hasWebApiClientChanges: description: "WebApiClient related files changed" value: ${{ jobs.check-for-changes.outputs.hasWebApiClientChanges }} + hasWebApiClientRefitterInterfaceChanges: + description: "Refitter interface changed" + value: ${{ jobs.check-for-changes.outputs.hasWebApiClientRefitterInterfaceChanges }} hasTestChanges: description: "Test related files changed" value: ${{ jobs.check-for-changes.outputs.hasTestChanges }} @@ -51,6 +54,7 @@ jobs: hasSwaggerSchemaChanges: ${{ steps.filter-backend.outputs.swagger_schema_any_modified == 'true'}} hasGqlSchemaChanges: ${{ steps.filter-backend.outputs.gql_schema_any_modified == 'true'}} hasMigrationChanges: ${{ steps.filter-backend.outputs.migration_any_modified == 'true'}} + hasWebApiClientRefitterInterfaceChanges: ${{ steps.filter-backend.outputs.web_api_client_refitter_interface_any_modified == 'true'}} hasWebApiClientChanges: ${{ steps.filter-backend.outputs.web_api_client_any_modified == 'true'}} steps: - name: Checkout @@ -83,6 +87,8 @@ jobs: - '.azure/modules/containerApp/**/*' tests: - 'tests/**/*' + web_api_client_refitter_interface: + - 'src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.cs' web_api_client: - 'src/Digdir.Library.Dialogporten.WebApiClient/**/*' swagger_schema: diff --git a/docs/schema/V1/swagger.verified.json b/docs/schema/V1/swagger.verified.json index 5e82e26ae..3757aa8d2 100644 --- a/docs/schema/V1/swagger.verified.json +++ b/docs/schema/V1/swagger.verified.json @@ -349,7 +349,7 @@ "type": "string" }, "value": { - "description": "A list of localizations for the content.", + "description": "A list of localizations for the content some change!", "items": { "$ref": "#/components/schemas/V1CommonLocalizations_Localization" }, diff --git a/src/Digdir.Domain.Dialogporten.Application/Features/V1/Common/Content/ContentValueDto.cs b/src/Digdir.Domain.Dialogporten.Application/Features/V1/Common/Content/ContentValueDto.cs index 2f63741bd..7a35229e9 100644 --- a/src/Digdir.Domain.Dialogporten.Application/Features/V1/Common/Content/ContentValueDto.cs +++ b/src/Digdir.Domain.Dialogporten.Application/Features/V1/Common/Content/ContentValueDto.cs @@ -6,7 +6,7 @@ namespace Digdir.Domain.Dialogporten.Application.Features.V1.Common.Content; public sealed class ContentValueDto { /// - /// A list of localizations for the content. + /// A list of localizations for the content some change! /// public List Value { get; set; } = [];