From c47ead2b871fe79631badcd3314a7bc3063596ac Mon Sep 17 00:00:00 2001 From: Reuven Harrison Date: Sat, 18 Apr 2026 11:09:55 +0300 Subject: [PATCH 1/9] Add GitHub Action to detect breaking changes --- .github/workflows/breaking-changes.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/workflows/breaking-changes.yaml diff --git a/.github/workflows/breaking-changes.yaml b/.github/workflows/breaking-changes.yaml new file mode 100644 index 0000000..41b4677 --- /dev/null +++ b/.github/workflows/breaking-changes.yaml @@ -0,0 +1,12 @@ +name: detect-breaking-changes +on: + pull_request: + branches: [ "main" ] +jobs: + oasdiff: + runs-on: ubuntu-latest + steps: + - uses: oasdiff/oasdiff-action/breaking@v0.0.40-beta.2 + with: + base: 'specs/simple.yaml' + revision: 'specs/simple.yaml' From 3f4ec32476601a93dd973b879820eaf52934f4aa Mon Sep 17 00:00:00 2001 From: Reuven Harrison Date: Sat, 18 Apr 2026 11:11:23 +0300 Subject: [PATCH 2/9] Update paths in breaking-changes.yaml --- .github/workflows/breaking-changes.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/breaking-changes.yaml b/.github/workflows/breaking-changes.yaml index 41b4677..4094d82 100644 --- a/.github/workflows/breaking-changes.yaml +++ b/.github/workflows/breaking-changes.yaml @@ -8,5 +8,5 @@ jobs: steps: - uses: oasdiff/oasdiff-action/breaking@v0.0.40-beta.2 with: - base: 'specs/simple.yaml' - revision: 'specs/simple.yaml' + base: 'simple.yaml' + revision: 'simple.yaml' From 95dc00c19bf386ccc22bf61d6b12a8959d2c9b96 Mon Sep 17 00:00:00 2001 From: Reuven Harrison Date: Sat, 18 Apr 2026 11:13:19 +0300 Subject: [PATCH 3/9] Update paths for base and revision in workflow --- .github/workflows/breaking-changes.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/breaking-changes.yaml b/.github/workflows/breaking-changes.yaml index 4094d82..78ffca4 100644 --- a/.github/workflows/breaking-changes.yaml +++ b/.github/workflows/breaking-changes.yaml @@ -8,5 +8,5 @@ jobs: steps: - uses: oasdiff/oasdiff-action/breaking@v0.0.40-beta.2 with: - base: 'simple.yaml' - revision: 'simple.yaml' + base: './simple.yaml' + revision: './simple.yaml' From 29b0b77f2c6cfb03ec9118351c417bed97074e2f Mon Sep 17 00:00:00 2001 From: Reuven Harrison Date: Sat, 18 Apr 2026 11:15:15 +0300 Subject: [PATCH 4/9] Update breaking changes workflow to use dynamic refs --- .github/workflows/breaking-changes.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/breaking-changes.yaml b/.github/workflows/breaking-changes.yaml index 78ffca4..4d1d6db 100644 --- a/.github/workflows/breaking-changes.yaml +++ b/.github/workflows/breaking-changes.yaml @@ -8,5 +8,5 @@ jobs: steps: - uses: oasdiff/oasdiff-action/breaking@v0.0.40-beta.2 with: - base: './simple.yaml' - revision: './simple.yaml' + base: 'origin/${{ github.base_ref }}:simple.yaml' + revision: 'HEAD:simple.yaml' From 4cf42ed2ea9b83b4d0434687af54018ceccebe52 Mon Sep 17 00:00:00 2001 From: Reuven Harrison Date: Sat, 18 Apr 2026 11:17:39 +0300 Subject: [PATCH 5/9] Add checkout action and fetch command to workflow --- .github/workflows/breaking-changes.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/breaking-changes.yaml b/.github/workflows/breaking-changes.yaml index 4d1d6db..0391d47 100644 --- a/.github/workflows/breaking-changes.yaml +++ b/.github/workflows/breaking-changes.yaml @@ -6,6 +6,10 @@ jobs: oasdiff: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v6 + + - run: git fetch --depth=1 origin ${{ github.base_ref }} + - uses: oasdiff/oasdiff-action/breaking@v0.0.40-beta.2 with: base: 'origin/${{ github.base_ref }}:simple.yaml' From e97f51ea662c2e3f701f508e6904370bd578dea1 Mon Sep 17 00:00:00 2001 From: Reuven Harrison Date: Sat, 18 Apr 2026 11:18:35 +0300 Subject: [PATCH 6/9] Make groupId parameter required in simple.yaml --- simple.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simple.yaml b/simple.yaml index b635d93..e031302 100644 --- a/simple.yaml +++ b/simple.yaml @@ -9,7 +9,7 @@ components: groupId: in: query name: groupId - required: false + required: true schema: type: string schemas: From 832b1fdf4101a1c3c5f6cd8ddb4bd87ee823e5ba Mon Sep 17 00:00:00 2001 From: Reuven Harrison Date: Sat, 18 Apr 2026 11:20:06 +0300 Subject: [PATCH 7/9] Update schema to include 'id' as a required field Add 'id' to the required fields in the schema. --- simple.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/simple.yaml b/simple.yaml index e031302..4e7ceac 100644 --- a/simple.yaml +++ b/simple.yaml @@ -31,6 +31,7 @@ components: type: string required: - name + - id paths: /api/v1.0/groups: post: From d2de5d367f1be9944412b4588f792de0628c2f5c Mon Sep 17 00:00:00 2001 From: Reuven Harrison Date: Sat, 18 Apr 2026 11:31:56 +0300 Subject: [PATCH 8/9] break --- simple.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/simple.yaml b/simple.yaml index 4e7ceac..632382a 100644 --- a/simple.yaml +++ b/simple.yaml @@ -9,7 +9,7 @@ components: groupId: in: query name: groupId - required: true + required: false schema: type: string schemas: @@ -29,9 +29,11 @@ components: readOnly: true name: type: string + email: + type: string required: - name - - id + - email paths: /api/v1.0/groups: post: From 4c07d528be1942f795bd8ed59138f8372a813c9c Mon Sep 17 00:00:00 2001 From: Reuven Harrison Date: Sat, 18 Apr 2026 11:34:04 +0300 Subject: [PATCH 9/9] Add fail-on option to breaking changes workflow --- .github/workflows/breaking-changes.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/breaking-changes.yaml b/.github/workflows/breaking-changes.yaml index 0391d47..029170c 100644 --- a/.github/workflows/breaking-changes.yaml +++ b/.github/workflows/breaking-changes.yaml @@ -14,3 +14,4 @@ jobs: with: base: 'origin/${{ github.base_ref }}:simple.yaml' revision: 'HEAD:simple.yaml' + fail-on: WARN