DEV Community

Cover image for OpenAPI Collaboration Without Abandoning Git: How File-Based Teams Work Together
Hassann
Hassann

Posted on • Originally published at apidog.com

OpenAPI Collaboration Without Abandoning Git: How File-Based Teams Work Together

OpenAPI team collaboration often breaks down after the spec moves into Git. Git is the right source of truth for OpenAPI YAML or JSON, but Git review tools are optimized for engineers reviewing code—not for QA, frontend, mobile, product, or external stakeholders participating in API design.

Try Apidog today

If your team already stores OpenAPI specs as files in a repository, you have probably seen this pattern: the spec is versioned, but collaboration still happens elsewhere. Non-engineers review rendered docs in a browser, questions move to Slack DMs, mocks require manual setup, and developers must update the file before anyone can test against the latest design.

The api-spec-as-code post explains why Git should be the source of truth. This article focuses on the remaining workflow gap: how to connect that committed spec to comments, mocks, notifications, docs, and CI/CD without moving the spec out of Git. Tools like Apidog are designed to add that collaboration layer.

The gap Git alone does not close

Git gives you:

  • Change history
  • Branches
  • Pull requests
  • Diffs
  • Review approvals
  • CI triggers

Those are critical for engineering workflows. But once more teams start working from the same OpenAPI file, several collaboration problems remain.

1. Non-engineers need spec-level comments

A QA engineer may notice that POST /payments returns a different error format than the rest of the API.

In GitHub, they would need to comment on a YAML diff line. That works for code reviewers, but it is not ideal for stakeholders reading the API as documentation.

What they usually need is a way to comment on:

  • An endpoint
  • A request body
  • A response schema
  • An example
  • A field description

2. Frontend teams need live mocks per branch

A raw openapi.yaml file is not automatically runnable.

Frontend developers often need a mock server before backend work is finished. Without a collaboration layer, someone has to run a separate tool manually, for example:

npx @stoplight/prism-cli mock api/openapi.yaml
Enter fullscreen mode Exit fullscreen mode

That does not solve branch-specific work unless your team wires it into the workflow.

3. Teams need targeted notifications

When a backend team changes /payments, frontend and mobile teams need to know.

A Git webhook can say:

openapi.yaml changed.

But downstream teams usually need something more specific:

POST /payments response schema changed. Frontend and mobile teams may be affected.

That requires a layer that understands the OpenAPI structure, not just the file diff.

4. API documentation needs audience-level access control

A public GitHub repo exposes everything. A private repo restricts everything.

API documentation often needs more granular access, such as:

  • Public endpoints for partners
  • Internal admin endpoints for employees only
  • Beta endpoints for selected consumers
  • Different visibility by team or role

Git does not provide that directly for generated API documentation.

These are not reasons to avoid Git. They are reasons to connect Git to a collaboration workflow.

What a collaboration layer should do

Use this model:

Git remains the source of truth. The collaboration layer turns the committed OpenAPI file into docs, mocks, reviews, notifications, and CI/CD signals.

A good collaboration layer should not replace your repository. It should read from it and keep engineers working through normal pull requests.

Category Examples Strengths What they add on top of Git
Hosted spec platforms Stoplight, SwaggerHub Polished UI, comments, access control Often maintain their own copy of the spec; Git may be optional
File-native collaboration layers Apidog Spec-First Mode, Redocly Work from committed files; Git stays authoritative Add collaboration, mocks, reports, and CI features on top of files
Git-native API clients Bruno, Insomnia File sync, request collections, local workflows Focus on requests; docs, mocks, and reports are not always connected

This distinction matters. A tool can be excellent at request execution while still not solving API documentation, mocks, or stakeholder review.

Bruno is strong for Git-native requests, but stops at the request layer

Bruno deserves a clear evaluation.

Bruno Ultimate provides:

  • File-native collection storage
  • Git integration
  • SSO
  • SCIM
  • Secret manager hooks
  • Audit logging

If your main requirement is executing API requests from collections that live in Git, Bruno is a strong option.

However, Bruno does not replace a full OpenAPI collaboration workflow. It does not automatically provide:

  • Generated API documentation from a committed OpenAPI file
  • Branch-aware mock servers from that file
  • Role-specific notifications when a path or schema changes
  • Documentation access control for different audiences

So if your team already uses Stoplight for docs and mocks, adding Bruno does not remove Stoplight from the architecture. It adds a Git-native API client alongside it.

That may be the right choice, but it is important to document the architecture explicitly.

How Apidog Spec-First Mode bridges the gap

Apidog’s Spec-First Mode, currently in beta, is designed for teams that want Git to stay authoritative.

The workflow is:

  1. Commit openapi.yaml or openapi.json to Git.
  2. Link the repository and file path in Apidog.
  3. Let Apidog render docs, comments, mocks, notifications, and tests from that file.
  4. Keep code review and merging in Git.

Apidog Spec-First Mode

Step 1: Link your Git repository

In Apidog, connect a project to GitHub, GitLab, or Bitbucket, then point it to the OpenAPI file path.

For connection details, see the apidog-git-integration-sync guide.

Example repository layout:

my-service/
├── api/
│   └── openapi.yaml
├── src/
├── tests/
└── .github/
    └── workflows/
Enter fullscreen mode Exit fullscreen mode

Example openapi.yaml:

# api/openapi.yaml
openapi: "3.1.0"

info:
  title: Payments API
  version: "2.4.0"

paths:
  /payments:
    post:
      summary: Create a payment
      operationId: createPayment
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PaymentRequest"
      responses:
        "201":
          description: Payment created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PaymentResponse"
        "422":
          description: Validation error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ValidationError"

components:
  schemas:
    PaymentRequest:
      type: object
      required:
        - amount
        - currency
        - source
      properties:
        amount:
          type: integer
          description: Amount in smallest currency unit, for example cents
        currency:
          type: string
          enum:
            - usd
            - eur
            - gbp
        source:
          type: string
          description: Payment method token

    PaymentResponse:
      type: object
      properties:
        id:
          type: string
        status:
          type: string
          enum:
            - pending
            - completed
            - failed

    ValidationError:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
Enter fullscreen mode Exit fullscreen mode

Step 2: Review the API as a spec, not only as a diff

After the repository is linked, Apidog renders the OpenAPI file as interactive API documentation.

That lets non-engineers review the API in the format they actually use.

For example, a QA engineer reviewing POST /payments can comment:

This endpoint should require an Idempotency-Key header.

They do not need to edit YAML or comment on a Git diff line.

Commenting on API specs in Apidog

The practical review flow becomes:

  1. Developer opens a branch and updates api/openapi.yaml.
  2. Apidog renders the updated spec.
  3. QA, frontend, and product review endpoints in the UI.
  4. Stakeholders leave comments on endpoints, schemas, or examples.
  5. Developer updates the spec.
  6. Git PR review and merge remain the final source-of-truth workflow.

This keeps feedback attached to API concepts instead of line numbers.

Step 3: Generate branch-specific mocks

With Spec-First Mode, each branch can produce a mock server that reflects the OpenAPI file on that branch.

Example:

Branch Purpose Mock behavior
main Current stable API Stable mock for production-like consumers
feature/payment-v2 New payment schema Mock reflects the changed request and response bodies
fix/error-format Error response update Mock returns updated error schema

Branch-specific mocks in Apidog

This helps frontend developers start integration work before the backend implementation is complete.

Instead of waiting for backend deployment, they can point their local app at the mock URL for the relevant branch.

Example frontend environment config:

VITE_API_BASE_URL=https://mock.example.com/payment-v2
Enter fullscreen mode Exit fullscreen mode

Or in a simple client:

const API_BASE_URL = import.meta.env.VITE_API_BASE_URL;

export async function createPayment(payload: {
  amount: number;
  currency: "usd" | "eur" | "gbp";
  source: string;
}) {
  const response = await fetch(`${API_BASE_URL}/payments`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "Idempotency-Key": crypto.randomUUID(),
    },
    body: JSON.stringify(payload),
  });

  if (!response.ok) {
    throw new Error("Payment request failed");
  }

  return response.json();
}
Enter fullscreen mode Exit fullscreen mode

Step 4: Route notifications to the right teams

When a path or schema changes after merge, Apidog can send notifications to configured channels.

A practical setup might look like this:

API area Path prefix Notification target
Payments /payments #frontend-payments, #mobile-payments
Admin /admin #internal-platform
Public partner API /partners #partner-integrations
Auth /oauth, /sessions #security, #frontend-platform

For webhook setup on chat platforms, see:

In a trial, verify the notification granularity your team needs, such as:

  • Per tag
  • Per path prefix
  • Per endpoint
  • Per project
  • Per environment

Also verify how documentation access control maps to your organization’s role structure.

Connect the collaboration layer to CI/CD

The collaboration layer becomes more useful when it is part of your pipeline.

A common CI setup should validate the OpenAPI file and run contract tests before changes merge.

You can combine:

  • Spectral or Redocly CLI for OpenAPI linting
  • Apidog CLI for contract testing
  • GitHub Actions, GitLab CI, or another CI runner

Example GitHub Actions workflow:

# .github/workflows/api-spec.yml
name: API spec validation and test

on:
  push:
  pull_request:

jobs:
  validate-and-test:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

      - name: Validate OpenAPI spec with Spectral
        run: |
          npm install -g @stoplight/spectral-cli
          spectral lint api/openapi.yaml --ruleset .spectral.yaml

      - name: Run Apidog contract tests
        env:
          APIDOG_TOKEN: ${{ secrets.APIDOG_TOKEN }}
        run: |
          npx apidog-cli run \
            --project-id ${{ vars.APIDOG_PROJECT_ID }} \
            --test-suite "Payments API smoke" \
            --environment staging
Enter fullscreen mode Exit fullscreen mode

A minimal Spectral ruleset might start like this:

# .spectral.yaml
extends:
  - spectral:oas

rules:
  operation-operationId: error
  operation-summary: warn
  no-$ref-siblings: error
Enter fullscreen mode Exit fullscreen mode

The OpenAPI spec is the canonical reference for what your API promises. Running contract tests against the committed file helps catch drift between the implementation and the spec.

For a deeper Git-native workflow, see git-native-api-workflow.

Tool comparison for file-based OpenAPI teams

If you are evaluating tools, compare them by workflow coverage instead of one isolated feature.

Capabilities marked as “check in trial” should be validated against your plan, repository structure, and access-control requirements.

Capability Stoplight SwaggerHub Apidog Spec-First Mode, beta
Git as authoritative source Optional; often own copy by default Optional Yes, in Spec-First Mode
Design-time comments Yes Yes Yes
Branch-specific mocks Yes Partial Yes
Role-based doc access Yes Yes Check in trial
Cross-project schema reuse Yes Yes Check in trial
CI/CD contract testing Via Prism Limited Yes, via Apidog CLI
Custom lint rules Via Spectral Limited Check in trial
SSO/SCIM Paid tiers Enterprise Check in trial
Notification routing Via webhooks Limited Yes
File-native workflow with no double copy No No Yes, in Spec-First Mode

For a broader comparison with SwaggerHub, see swaggerhub-vs-apidog-collaboration.

Implementation checklist

Use this checklist if you want to move from “OpenAPI in Git” to a working collaboration workflow.

Repository setup

  • [ ] Store the spec at a stable path, for example api/openapi.yaml
  • [ ] Use OpenAPI 3.1 only if all required tools support it
  • [ ] Add a linter ruleset, such as .spectral.yaml
  • [ ] Require pull requests for spec changes
  • [ ] Add CODEOWNERS for API areas if needed

Example CODEOWNERS:

/api/openapi.yaml @backend-platform @api-reviewers
Enter fullscreen mode Exit fullscreen mode

Collaboration setup

  • [ ] Link the repository to the collaboration layer
  • [ ] Confirm branch sync behavior
  • [ ] Confirm whether UI edits can be pushed back to Git
  • [ ] Add reviewers from QA, frontend, mobile, and product
  • [ ] Define how comments are resolved before merge

Mocking setup

  • [ ] Enable mocks for the default branch
  • [ ] Enable branch-specific mocks for feature branches
  • [ ] Share mock URLs with frontend and mobile teams
  • [ ] Add mock base URLs to local development environment files

Notification setup

  • [ ] Map API path prefixes or tags to owning teams
  • [ ] Configure Slack or Teams webhooks
  • [ ] Test notifications on a non-critical branch
  • [ ] Confirm whether notifications fire on push, PR, or merge

CI/CD setup

  • [ ] Run OpenAPI linting on every pull request
  • [ ] Run contract tests against staging or preview environments
  • [ ] Store API tokens in CI secrets
  • [ ] Fail the pipeline when the implementation drifts from the spec

FAQ

Can we keep Git PR reviews alongside Apidog comments?

Yes.

Use both flows for different audiences:

  • Git PR reviews: engineers reviewing YAML changes
  • Apidog comments: QA, frontend, mobile, product, and other stakeholders reviewing the API as documentation

The committed OpenAPI file remains the single source of truth.

What happens if someone edits the spec in Apidog instead of the file?

In Spec-First Mode, edits made in Apidog can be pushed back to Git as commits.

A typical flow is:

  1. Edit the spec in the UI.
  2. Commit the change to a branch.
  3. Open a pull request in Git.
  4. Review and merge through the normal Git workflow.

Verify the exact sync behavior in your trial because Git-to-Apidog and Apidog-to-Git workflows affect how your team decides where edits should originate.

For a walkthrough, see spec-first-mode-apidog-beta-walkthrough.

Does Spec-First Mode work with monorepos that have multiple OpenAPI files?

Multiple OpenAPI files are common in monorepos.

A typical layout might be:

repo/
├── services/
│   ├── payments/
│   │   └── api/openapi.yaml
│   ├── billing/
│   │   └── api/openapi.yaml
│   └── identity/
│       └── api/openapi.yaml
Enter fullscreen mode Exit fullscreen mode

Apidog supports multiple projects, each linked to a different file path.

If you need one project to map to several spec files, or you need shared lint rules and shared schemas across projects, test that against your actual repo layout during evaluation.

How does this compare to Redocly for file-based teams?

Redocly CLI is strong for:

  • Linting
  • Bundling
  • Docs generation from files

Redocly’s hosted platform adds review and team features.

The distinction is similar to the Stoplight comparison: Redocly can support file-based workflows, while Apidog’s differentiation is combining docs, mocks, contract testing, notifications, and collaboration around the committed OpenAPI file.

What about the OpenAPI Initiative’s own tooling?

The OpenAPI Initiative publishes the OpenAPI specification. It does not provide a complete collaboration platform.

You still need to choose tools for:

  • Editing
  • Linting
  • Mocking
  • Documentation
  • Contract testing
  • Review workflows
  • Notifications

If your spec uses OpenAPI 3.1, test every tool against OpenAPI 3.1, because support varies across the ecosystem.

Conclusion

If your team already stores OpenAPI specs in Git, the file-management problem is solved. The collaboration problem is not.

You still need a workflow for:

  • Non-engineer review comments
  • Branch-specific mocks
  • Role-targeted notifications
  • Access-controlled API documentation
  • CI/CD contract testing

That layer should not replace Git. It should read from Git, build on top of the committed file, and preserve pull requests as the engineering review process.

If your current setup uses one tool for docs, another for mocks, another for requests, and Git for versioning, Apidog Spec-First Mode is designed to consolidate that workflow around the OpenAPI file you already maintain.

Because Spec-First Mode is still in beta, run a focused trial before committing. Validate the capabilities that matter most to your team, especially documentation access control, cross-project schema reuse, and notification granularity.

Download Apidog and connect it to a branch of your existing spec repository to test how the collaboration layer fits into your current Git workflow.

Top comments (0)