Skip to content

feat: implement OpenAPI contract regression tests and CI integration#1159

Merged
Devsol-01 merged 1 commit into
Devsol-01:mainfrom
eischideraa-unn:feat/openapi-contract-regression-tests
Jun 30, 2026
Merged

feat: implement OpenAPI contract regression tests and CI integration#1159
Devsol-01 merged 1 commit into
Devsol-01:mainfrom
eischideraa-unn:feat/openapi-contract-regression-tests

Conversation

@eischideraa-unn

Copy link
Copy Markdown
Contributor

Pull Request: OpenAPI Contract Regression Tests & CI Integration

Description

This PR introduces end-to-end contract regression tests to ensure that the OpenAPI specification remains
consistent and does not drift in ways that break consumer assumptions. It also integrates these tests into the
CI pipeline to act as a gatekeeper against accidental contract breaks.

Changes Implemented

  1. Contract Regression Testing
  • New Test Suite: Created backend/test/openapi-contract.spec.ts to perform snapshot testing and schema
    validation on the generated openapi-v2.json.
  • Jest Configuration: Added backend/test/jest-contract.js to manage the execution environment for these
    specialized contract tests.
  • Automation Script: Added test:contract to backend/package.json, which automatically triggers spec
    generation followed by contract validation.
  1. CI/CD Integration
  • Pipeline Update: Modified .github/workflows/backend-ci-cd.yml to include a contract test step within the
    openapi-sdk job. This ensures that any changes causing spec drift are caught during CI before proceeding to
    build or deployment.
  1. Dependencies & Fixes
  • Dependencies: Installed js-yaml and @types/js-yaml in backend to support spec generation scripts.
  • Bug Fix: Resolved a syntax error (extra closing brace) in
    backend/src/modules/feature-flags/feature-flags.service.ts that was preventing successful project builds.

Testing and Validation

  • Local Validation: Ran npm run test:contract within the backend directory to verify snapshot and schema
    validation logic.
  • CI Validation: The tests are now integrated into the openapi-sdk CI job and will automatically run on
    push/PR events to the configured branches.

Related Issues

@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nestera Ready Ready Preview, Comment Jun 30, 2026 4:28am

@drips-wave

drips-wave Bot commented Jun 30, 2026

Copy link
Copy Markdown

@eischideraa-unn Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Devsol-01 Devsol-01 merged commit f20a462 into Devsol-01:main Jun 30, 2026
3 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Backend] -- Add End-to-End Contract Regression Tests for OpenAPI Spec

2 participants