From a399f7d171b2893cae8c532b0721a6672e4a6fc7 Mon Sep 17 00:00:00 2001 From: omermorad Date: Sat, 28 Mar 2026 02:45:20 +0300 Subject: [PATCH 1/9] feat!: remove GET /pets/{petId} endpoint BREAKING CHANGE: Removed individual pet lookup endpoint --- .contractual/changesets/eager-wolves-prowl.md | 7 ++++ specs/petstore.openapi.yaml | 36 ------------------- 2 files changed, 7 insertions(+), 36 deletions(-) create mode 100644 .contractual/changesets/eager-wolves-prowl.md diff --git a/.contractual/changesets/eager-wolves-prowl.md b/.contractual/changesets/eager-wolves-prowl.md new file mode 100644 index 0000000..46291a2 --- /dev/null +++ b/.contractual/changesets/eager-wolves-prowl.md @@ -0,0 +1,7 @@ +--- +"petstore": major +--- + +## petstore + +- **[BREAKING]** remove path at paths./pets/{petId} diff --git a/specs/petstore.openapi.yaml b/specs/petstore.openapi.yaml index 8f565f2..bf14ec1 100644 --- a/specs/petstore.openapi.yaml +++ b/specs/petstore.openapi.yaml @@ -77,40 +77,6 @@ paths: schema: $ref: '#/components/schemas/Error' - /pets/{petId}: - get: - summary: Get a pet by ID - description: Returns a single pet by its ID - operationId: getPetById - tags: - - pets - parameters: - - name: petId - in: path - required: true - description: ID of the pet to retrieve - schema: - type: string - format: uuid - responses: - '200': - description: Successful response - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - '404': - description: Pet not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '500': - description: Internal server error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' components: @@ -137,7 +103,6 @@ components: enum: - dog - cat - - bird - rabbit description: Species of the pet breed: @@ -185,7 +150,6 @@ components: enum: - dog - cat - - bird - rabbit description: Species of the pet breed: From a0063c8d8c6bfaac7aa33dd70fa4de9583806120 Mon Sep 17 00:00:00 2001 From: omermorad Date: Sat, 28 Mar 2026 06:49:13 +0300 Subject: [PATCH 2/9] ci: use v0.1.0-dev.0 action version --- .github/workflows/pr-check.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index af0b554..c1bb5cb 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -18,7 +18,7 @@ jobs: uses: actions/checkout@v4 - name: Run Contractual PR Check - uses: contractual-dev/action@v1 + uses: contractual-dev/action@v0.1.0-dev.0 with: mode: pr-check fail-on-breaking: 'true' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f70b92d..b3b711e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,7 +20,7 @@ jobs: - name: Release Contracts id: release - uses: contractual-dev/action@v1 + uses: contractual-dev/action@v0.1.0-dev.0 with: mode: release github-token: ${{ secrets.GITHUB_TOKEN }} From c101890b00ff95f6fb2eb9212a654884577d93de Mon Sep 17 00:00:00 2001 From: omermorad Date: Sat, 28 Mar 2026 06:56:02 +0300 Subject: [PATCH 3/9] test: trigger workflow rerun --- .github/workflows/pr-check.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index c1bb5cb..7d8dde3 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -24,3 +24,4 @@ jobs: fail-on-breaking: 'true' auto-changeset: 'true' github-token: ${{ secrets.GITHUB_TOKEN }} +# Test workflow From adad8efbbc7d516807362f7d757a4f54eaa04587 Mon Sep 17 00:00:00 2001 From: omermorad Date: Sat, 28 Mar 2026 06:58:14 +0300 Subject: [PATCH 4/9] ci: revert to action-based workflows --- .github/workflows/pr-check.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 7d8dde3..c1bb5cb 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -24,4 +24,3 @@ jobs: fail-on-breaking: 'true' auto-changeset: 'true' github-token: ${{ secrets.GITHUB_TOKEN }} -# Test workflow From 11c5a9f9fee8625c2d9a8f7848f4e224d2898f6e Mon Sep 17 00:00:00 2001 From: omermorad Date: Sat, 28 Mar 2026 07:14:58 +0300 Subject: [PATCH 5/9] test: trigger workflow with fixed action --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b2bcff5..c69393f 100644 --- a/README.md +++ b/README.md @@ -319,3 +319,4 @@ Runs when changesets are merged to `main` to: ## License MIT + From f12e0e3a4cbe1dcca2119a8624923c88f831da40 Mon Sep 17 00:00:00 2001 From: omermorad Date: Sat, 28 Mar 2026 07:19:02 +0300 Subject: [PATCH 6/9] ci: upgrade to action v0.1.0-dev.1 with ESM fixes --- .github/workflows/pr-check.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index c1bb5cb..87cc4d3 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -18,7 +18,7 @@ jobs: uses: actions/checkout@v4 - name: Run Contractual PR Check - uses: contractual-dev/action@v0.1.0-dev.0 + uses: contractual-dev/action@v0.1.0-dev.1 with: mode: pr-check fail-on-breaking: 'true' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b3b711e..9bb9979 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,7 +20,7 @@ jobs: - name: Release Contracts id: release - uses: contractual-dev/action@v0.1.0-dev.0 + uses: contractual-dev/action@v0.1.0-dev.1 with: mode: release github-token: ${{ secrets.GITHUB_TOKEN }} From d8453bf27aafce59aa8f923fe3b50147753d25ac Mon Sep 17 00:00:00 2001 From: omermorad Date: Sat, 28 Mar 2026 07:22:01 +0300 Subject: [PATCH 7/9] ci: upgrade to action v0.1.0-dev.2 --- .github/workflows/pr-check.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 87cc4d3..925f2ab 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -18,7 +18,7 @@ jobs: uses: actions/checkout@v4 - name: Run Contractual PR Check - uses: contractual-dev/action@v0.1.0-dev.1 + uses: contractual-dev/action@v0.1.0-dev.2 with: mode: pr-check fail-on-breaking: 'true' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9bb9979..17d5118 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,7 +20,7 @@ jobs: - name: Release Contracts id: release - uses: contractual-dev/action@v0.1.0-dev.1 + uses: contractual-dev/action@v0.1.0-dev.2 with: mode: release github-token: ${{ secrets.GITHUB_TOKEN }} From d57e777a36c47e36743eaf813b790a13debd6453 Mon Sep 17 00:00:00 2001 From: omermorad Date: Sat, 28 Mar 2026 07:26:31 +0300 Subject: [PATCH 8/9] ci: upgrade to action v0.1.0-dev.3 --- .github/workflows/pr-check.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 925f2ab..6242c20 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -18,7 +18,7 @@ jobs: uses: actions/checkout@v4 - name: Run Contractual PR Check - uses: contractual-dev/action@v0.1.0-dev.2 + uses: contractual-dev/action@v0.1.0-dev.3 with: mode: pr-check fail-on-breaking: 'true' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 17d5118..6340056 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,7 +20,7 @@ jobs: - name: Release Contracts id: release - uses: contractual-dev/action@v0.1.0-dev.2 + uses: contractual-dev/action@v0.1.0-dev.3 with: mode: release github-token: ${{ secrets.GITHUB_TOKEN }} From 5ab5cff97eeb6f6cffd22ca9a9cdf2e4b6f3f9d9 Mon Sep 17 00:00:00 2001 From: omermorad Date: Sat, 28 Mar 2026 07:28:56 +0300 Subject: [PATCH 9/9] fix: add security scheme, license, and 4xx responses --- specs/petstore.openapi.yaml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/specs/petstore.openapi.yaml b/specs/petstore.openapi.yaml index bf14ec1..1ee263a 100644 --- a/specs/petstore.openapi.yaml +++ b/specs/petstore.openapi.yaml @@ -3,14 +3,20 @@ info: title: Petstore API description: A simple API for managing a pet store version: 1.0.0 + license: + name: MIT + url: https://opensource.org/licenses/MIT contact: name: API Support email: support@petstore.example.com servers: - - url: https://api.petstore.example.com/v1 + - url: https://api.petstore.io/v1 description: Production server +security: + - ApiKeyAuth: [] + paths: /pets: get: @@ -38,6 +44,12 @@ paths: type: array items: $ref: '#/components/schemas/Pet' + '400': + description: Invalid request parameters + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '500': description: Internal server error content: @@ -80,6 +92,12 @@ paths: components: + securitySchemes: + ApiKeyAuth: + type: apiKey + in: header + name: X-API-Key + schemas: Pet: type: object