From 810c104f1a493392646023a0870163b1a3b86607 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 29 Aug 2025 15:23:45 +0800 Subject: [PATCH 01/15] add new workflow to test dart --- .../workflows/samples-dart-build-test.yaml | 38 +++++++++++++++++++ .../.openapi-generator-ignore | 1 + 2 files changed, 39 insertions(+) create mode 100644 .github/workflows/samples-dart-build-test.yaml diff --git a/.github/workflows/samples-dart-build-test.yaml b/.github/workflows/samples-dart-build-test.yaml new file mode 100644 index 000000000000..12c09fa47b3e --- /dev/null +++ b/.github/workflows/samples-dart-build-test.yaml @@ -0,0 +1,38 @@ +name: Samples Dart (build, test) + +on: + push: + branches: + paths: + - samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/** + pull_request: + paths: + - samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/** + +jobs: + test: + runs-on: ${{ matrix.os }} + strategy: + sample: + - samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/ + matrix: + os: [ubuntu-latest, windows-latest] + sdk: ["3.1", "2.25.0"] + steps: + - uses: actions/checkout@v4 + - uses: dart-lang/setup-dart@v1 + working-directory: ${{ matrix.sample }} + with: + sdk: ${{ matrix.sdk }} + + - name: pub get + working-directory: ${{ matrix.sample }} + run: dart pub get + + - name: build_runner build + working-directory: ${{ matrix.sample }} + run: dart run build_runner build + + - name: test + working-directory: ${{ matrix.sample }} + run: dart test diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/.openapi-generator-ignore b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/.openapi-generator-ignore index 7484ee590a38..daed634bb4b7 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/.openapi-generator-ignore +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/.openapi-generator-ignore @@ -21,3 +21,4 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md +# From d2561085baebf32f9f5ecb168254939f8b9315d5 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 29 Aug 2025 15:31:32 +0800 Subject: [PATCH 02/15] fix --- .github/workflows/samples-dart-build-test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/samples-dart-build-test.yaml b/.github/workflows/samples-dart-build-test.yaml index 12c09fa47b3e..824ff17ba996 100644 --- a/.github/workflows/samples-dart-build-test.yaml +++ b/.github/workflows/samples-dart-build-test.yaml @@ -13,11 +13,11 @@ jobs: test: runs-on: ${{ matrix.os }} strategy: - sample: - - samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/ matrix: os: [ubuntu-latest, windows-latest] sdk: ["3.1", "2.25.0"] + sample: + - samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/ steps: - uses: actions/checkout@v4 - uses: dart-lang/setup-dart@v1 From 0185ac5b4b8f070b911a8603abbcc72367af883d Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 29 Aug 2025 15:37:23 +0800 Subject: [PATCH 03/15] fix --- .github/workflows/samples-dart-build-test.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/samples-dart-build-test.yaml b/.github/workflows/samples-dart-build-test.yaml index 824ff17ba996..b62772175ba7 100644 --- a/.github/workflows/samples-dart-build-test.yaml +++ b/.github/workflows/samples-dart-build-test.yaml @@ -21,7 +21,6 @@ jobs: steps: - uses: actions/checkout@v4 - uses: dart-lang/setup-dart@v1 - working-directory: ${{ matrix.sample }} with: sdk: ${{ matrix.sdk }} From 02ceca3b92d12353af3f47a7997299ddf9932ff0 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 29 Aug 2025 15:41:25 +0800 Subject: [PATCH 04/15] fix versions --- .github/workflows/samples-dart-build-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/samples-dart-build-test.yaml b/.github/workflows/samples-dart-build-test.yaml index b62772175ba7..e3ba5cda4527 100644 --- a/.github/workflows/samples-dart-build-test.yaml +++ b/.github/workflows/samples-dart-build-test.yaml @@ -15,7 +15,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] - sdk: ["3.1", "2.25.0"] + sdk: ["3.2.0", "2.19.0"] sample: - samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/ steps: From 9e1d934245149c0d9c83d3c07257ca82ee7d0e90 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 29 Aug 2025 15:42:49 +0800 Subject: [PATCH 05/15] newer version --- .github/workflows/samples-dart-build-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/samples-dart-build-test.yaml b/.github/workflows/samples-dart-build-test.yaml index e3ba5cda4527..39af72f9422a 100644 --- a/.github/workflows/samples-dart-build-test.yaml +++ b/.github/workflows/samples-dart-build-test.yaml @@ -15,7 +15,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] - sdk: ["3.2.0", "2.19.0"] + sdk: ["3.5.0", "2.19.0"] sample: - samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/ steps: From e27bee9dfd99fd396ccc0f7ad13a77b26408951b Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 29 Aug 2025 15:44:05 +0800 Subject: [PATCH 06/15] newer version --- .github/workflows/samples-dart-build-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/samples-dart-build-test.yaml b/.github/workflows/samples-dart-build-test.yaml index 39af72f9422a..54d0e379cc22 100644 --- a/.github/workflows/samples-dart-build-test.yaml +++ b/.github/workflows/samples-dart-build-test.yaml @@ -15,7 +15,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] - sdk: ["3.5.0", "2.19.0"] + sdk: ["3.6.0", "2.19.0"] sample: - samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/ steps: From 18046962c96c8443436a997f5207cab77397a6e3 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 29 Aug 2025 15:52:33 +0800 Subject: [PATCH 07/15] newer version --- .github/workflows/samples-dart-build-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/samples-dart-build-test.yaml b/.github/workflows/samples-dart-build-test.yaml index 54d0e379cc22..6e061219ce10 100644 --- a/.github/workflows/samples-dart-build-test.yaml +++ b/.github/workflows/samples-dart-build-test.yaml @@ -15,7 +15,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] - sdk: ["3.6.0", "2.19.0"] + sdk: ["3.7.0", "2.19.0"] sample: - samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/ steps: From 31637c29afa39fc7c2484678f3ba8337ee004dee Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 29 Aug 2025 15:54:51 +0800 Subject: [PATCH 08/15] newer version --- .github/workflows/samples-dart-build-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/samples-dart-build-test.yaml b/.github/workflows/samples-dart-build-test.yaml index 6e061219ce10..9c57b576cfc0 100644 --- a/.github/workflows/samples-dart-build-test.yaml +++ b/.github/workflows/samples-dart-build-test.yaml @@ -15,7 +15,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] - sdk: ["3.7.0", "2.19.0"] + sdk: ["3.7.0"] sample: - samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/ steps: From dde29398eeffe7384bb4fef42dbe6d463151bb5b Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 29 Aug 2025 15:57:24 +0800 Subject: [PATCH 09/15] newer version --- .github/workflows/samples-dart-build-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/samples-dart-build-test.yaml b/.github/workflows/samples-dart-build-test.yaml index 9c57b576cfc0..3fae07c0a477 100644 --- a/.github/workflows/samples-dart-build-test.yaml +++ b/.github/workflows/samples-dart-build-test.yaml @@ -15,7 +15,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] - sdk: ["3.7.0"] + sdk: ["3.9.0"] sample: - samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/ steps: From 3e7b7f7e3dfc87f4664a1445966990cf2c3c7387 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 29 Aug 2025 16:07:12 +0800 Subject: [PATCH 10/15] setup flutter --- .github/workflows/samples-dart-build-test.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/samples-dart-build-test.yaml b/.github/workflows/samples-dart-build-test.yaml index 3fae07c0a477..0d394719d221 100644 --- a/.github/workflows/samples-dart-build-test.yaml +++ b/.github/workflows/samples-dart-build-test.yaml @@ -20,10 +20,17 @@ jobs: - samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/ steps: - uses: actions/checkout@v4 + - uses: dart-lang/setup-dart@v1 with: sdk: ${{ matrix.sdk }} + - name: Set up Flutter + uses: subosito/flutter-action@v2 + with: + channel: stable + flutter-version: 3.19.0 + - name: pub get working-directory: ${{ matrix.sample }} run: dart pub get From 96da104b72806a95ff1321a633f1669190997efc Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 29 Aug 2025 16:21:54 +0800 Subject: [PATCH 11/15] update --- .../workflows/samples-dart-build-test.yaml | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/samples-dart-build-test.yaml b/.github/workflows/samples-dart-build-test.yaml index 0d394719d221..72579c54f4f0 100644 --- a/.github/workflows/samples-dart-build-test.yaml +++ b/.github/workflows/samples-dart-build-test.yaml @@ -4,10 +4,20 @@ on: push: branches: paths: - - samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/** + #- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/** + #- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/** + #- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/** + - samples/openapi3/client/petstore/dart-dio/oneof/** + - samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritancne/** + - samples/openapi3/client/petstore/dart-dio/binary_response/** pull_request: paths: - - samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/** + #- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/** + #- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/** + #- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/** + - samples/openapi3/client/petstore/dart-dio/oneof/** + - samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritancne/** + - samples/openapi3/client/petstore/dart-dio/binary_response/** jobs: test: @@ -17,7 +27,12 @@ jobs: os: [ubuntu-latest, windows-latest] sdk: ["3.9.0"] sample: - - samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/ + #- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/ + #- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/ + #- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/ + - samples/openapi3/client/petstore/dart-dio/oneof/ + - samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritancne/ + - samples/openapi3/client/petstore/dart-dio/binary_response/ steps: - uses: actions/checkout@v4 @@ -25,12 +40,6 @@ jobs: with: sdk: ${{ matrix.sdk }} - - name: Set up Flutter - uses: subosito/flutter-action@v2 - with: - channel: stable - flutter-version: 3.19.0 - - name: pub get working-directory: ${{ matrix.sample }} run: dart pub get From 819539de83a33c5e4e6c67f940421c1749feaa55 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 29 Aug 2025 16:26:09 +0800 Subject: [PATCH 12/15] update --- .../client/petstore/dart-dio/oneof/.openapi-generator-ignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/samples/openapi3/client/petstore/dart-dio/oneof/.openapi-generator-ignore b/samples/openapi3/client/petstore/dart-dio/oneof/.openapi-generator-ignore index 7484ee590a38..c5b04829c20a 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof/.openapi-generator-ignore +++ b/samples/openapi3/client/petstore/dart-dio/oneof/.openapi-generator-ignore @@ -21,3 +21,6 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md +# +# +# From 1ca8bbf036ca7cf7a872ba8659ff39957f127567 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 29 Aug 2025 16:38:11 +0800 Subject: [PATCH 13/15] fix path --- .github/workflows/samples-dart-build-test.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/samples-dart-build-test.yaml b/.github/workflows/samples-dart-build-test.yaml index 72579c54f4f0..8865e93c8ee0 100644 --- a/.github/workflows/samples-dart-build-test.yaml +++ b/.github/workflows/samples-dart-build-test.yaml @@ -8,7 +8,7 @@ on: #- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/** #- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/** - samples/openapi3/client/petstore/dart-dio/oneof/** - - samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritancne/** + - samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/** - samples/openapi3/client/petstore/dart-dio/binary_response/** pull_request: paths: @@ -16,7 +16,7 @@ on: #- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/** #- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/** - samples/openapi3/client/petstore/dart-dio/oneof/** - - samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritancne/** + - samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/** - samples/openapi3/client/petstore/dart-dio/binary_response/** jobs: @@ -31,7 +31,7 @@ jobs: #- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/ #- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/ - samples/openapi3/client/petstore/dart-dio/oneof/ - - samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritancne/ + - samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/ - samples/openapi3/client/petstore/dart-dio/binary_response/ steps: - uses: actions/checkout@v4 From 36b688dfcb2937224add7186e84ea82b9f2ae76b Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 29 Aug 2025 16:40:14 +0800 Subject: [PATCH 14/15] trigger build failure --- .../openapi3/client/petstore/dart-dio/oneof/lib/src/api.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/api.dart b/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/api.dart index dfd8e847bdd9..8e20ced0e8d0 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/api.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/api.dart @@ -1,3 +1,6 @@ +sdklfjaskl;df + + // // AUTO-GENERATED FILE, DO NOT MODIFY! // From ec46695e9de1b16e0c952c6ce83dec5c1c976798 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 29 Aug 2025 16:41:45 +0800 Subject: [PATCH 15/15] Revert "trigger build failure" This reverts commit 36b688dfcb2937224add7186e84ea82b9f2ae76b. --- .../openapi3/client/petstore/dart-dio/oneof/lib/src/api.dart | 3 --- 1 file changed, 3 deletions(-) diff --git a/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/api.dart b/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/api.dart index 8e20ced0e8d0..dfd8e847bdd9 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/api.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/api.dart @@ -1,6 +1,3 @@ -sdklfjaskl;df - - // // AUTO-GENERATED FILE, DO NOT MODIFY! //