Git-native Collaboration for API Testing and Engineering

Git-native Collaboration for API Testing and Engineering treats API specs, requests, tests, and docs like code: versioned, reviewed, tested, and merged through Git.

Oliver Kingsley

Oliver Kingsley

10 June 2026

Git-native Collaboration for API Testing and Engineering

Apidog for Enterprise

On-Premises Deploy

SSO & RBAC

SOC 2 Compliant

Explore Apidog Enterprise

Your OpenAPI spec is the contract between your API and its consumers. But where does that contract live?

Too often, API specifications sit in isolated tools—exported once, forgotten, and rarely updated when the implementation changes. Documentation drifts. Test collections diverge. Reviewers approve code changes without ever seeing the corresponding spec updates.

Spec-first Mode flips this model. Your OpenAPI or Swagger files become the source of truth, stored directly in your Git repository alongside the implementation code. Every spec change flows through the same branches, pull requests, and review process you already use. API design, testing, and documentation all stay synchronized—automatically.

In this tutorial, I'll walk you through setting up a Spec-first project in Apidog, editing specifications with your team, and keeping everything in sync with your Git workflow.

button

What is Spec-first Mode?

In a typical API project, you create endpoints through visual forms or import existing specs as a starting point. The tool stores API definitions internally, and Git integration (if available) is an export step.

Spec-first Mode is different. The primary workspace is file-based:

The specification file is always authoritative. Apidog reads from it, writes to it, and keeps it synchronized with your repository.

Create Specfirst Project

Prerequisites

To follow along, you'll need:


Step 1: Create a Spec-first Project

Click + New Project in Apidog and choose Spec-first Mode as the project type.

Next, connect your Git provider:

  1. Select your provider (GitHub, GitLab, Azure DevOps, or Bitbucket)
  2. Choose an organization or workspace
  3. Pick an existing repository or create a new one
  4. Select the main branch for synchronization

Apidog will sync with your repository's default branch. If it's not named main, Apidog adapts automatically.


During setup, you'll see an option to install a webhook. This enables automatic synchronization whenever your team pushes to the repository.

Note: Webhook installation typically requires admin permission on the repository. If you don't have admin access, skip this step—you can still sync manually using Git Pull.

Webhook benefits:

If you skipped webhook setup initially, you can add it later from Project Settings > Git & Branches.


Step 3: Explore the Specs Workspace

After creation, your project opens the Specs workspace—the central hub for file-based editing and Git operations.

Specs workspace

Three panels work together:

Panel What it shows
File Explorer All files and folders from your synced repository
API Structure Tree Parsed OpenAPI content: endpoints, schemas, definitions, overview
Editor Edit files in code view or form view

Click an endpoint in the structure tree → Apidog highlights the corresponding section in your source file. Navigate from high-level API view to low-level YAML without switching tabs.


Step 4: Edit Your Specification Files

Code View: Direct Editing

For most files—YAML, JSON, Markdown—use Code view to edit the raw text.

Code view editing

Your edits stay in the file. Apidog doesn't transform or store them separately. The spec file remains the single source of truth.

Form View: Structured Editing

For supported OpenAPI nodes—endpoints, schemas, definitions, and API overview—switch to Form view.

Form view editing

Form view is useful when:

If a node doesn't support form editing, Apidog keeps you in code view.


Step 5: Validate and Preview Instantly

Spec-first Mode includes real-time validation and documentation preview—no external tools required.

Check for Issues with Validation

Click Validation in the editor header. A panel shows all warnings and errors in your current spec.

Validation panel

The badge displays the total issue count. Catch:

Fix issues before committing. Your team's reviewers won't need to spot these manually.

Preview Your Documentation

Click Preview to see how your spec renders as API documentation.

For endpoints, preview includes two tabs:

Tab Content
Docs Generated endpoint documentation
Try it out Live request panel based on the endpoint definition
Endpoint preview with Try it out

For schemas and definitions, preview shows the rendered documentation view.

Schema preview
Validation and Preview share the same side panel. Opening one automatically closes the other.

Step 6: Pull Updates from Your Team

When collaborators push changes to your repository, bring them into Apidog:

  1. Open the Specs workspace
  2. Click the current branch name in the sidebar
  3. Select Git Pull

If webhook sync is active, Apidog pulls automatically on repository push events—no manual step needed.


Step 7: Commit and Push Your Changes

After editing files in Apidog, send your updates back to Git:

  1. Make changes in the Specs workspace
  2. Click Changes in the sidebar to see modified, added, renamed, and deleted files
  3. Click Commit & Push
  4. Select which files to include
  5. Write a commit message
  6. Click Push
Commit and push workflow

Your spec updates now appear in the same pull request workflow as your code changes. Teammates can review, comment, and approve—both implementation and API contract in one place.

Tip: Use Discard all changes if you want to abandon local edits before pushing.

Step 8: Work with Branches

Spec-first Mode supports full branch-based collaboration. Apidog maps Git branches to project branches, letting you switch between spec versions.

Branch management

Common Branch Operations

Action How to do it
Switch branches Click branch name → select another branch
Import existing Git branch Click Import New Branch → select → import
Create new branch Project Settings > Git & Branches → New Branch
Fix sync issues Use Re-sync in branch settings
View sync logs Branch actions → View Logs

Branch management works the same way you expect from Git—feature branches, releases, and parallel development all sync correctly.


Step 9: Integrate with CI/CD

Since your specs live in Git, they fit naturally into automation pipelines:

Example GitHub Actions workflow:

name: Validate and Test API Spec

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  validate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Lint OpenAPI Spec
        run: npx spectral lint openapi.yaml

      - name: Run API Tests
        run: apidog run tests --spec openapi.yaml

Your API specifications now pass through the same quality gates as your application code.


Alternative: Storage-backed Projects

If you're not ready to connect an external Git repository, Apidog offers storage-backed Spec-first projects.

Storagebacked project

These projects use Apidog's internal storage but still provide:

UI labels adjust slightly:

Migrate to external Git whenever your team is ready.


Summary

With Spec-first Mode, your API workflow becomes:

Before Spec-first After Spec-first
Specs live in a separate tool Specs live in your Git repo
Export/import to sync Automatic sync on push
Reviews happen outside code reviews Reviews happen in pull requests
Documentation generated separately Preview while editing
Tests disconnected from spec changes Tests triggered by spec updates

Spec-first Mode makes OpenAPI files the contract they should be—versioned, reviewed, and always aligned with your code.

Ready to try? Create a Spec-first project in Apidog and connect your first repository.

button

Explore more

How to Use Claude Fable 5 in Cursor

How to Use Claude Fable 5 in Cursor

Set up Claude Fable 5 in Cursor: add your Anthropic API key, enable claude-fable-5, select it, and understand the $10/$50 own-key billing before long runs.

10 June 2026

How to Use the Claude Fable 5 API

How to Use the Claude Fable 5 API

Call the Claude Fable 5 API with working Python, TypeScript, and curl code: streaming, tool use, errors, cost math, plus how to test it in Apidog.

10 June 2026

How to Use Claude Fable 5 with Claude Code

How to Use Claude Fable 5 with Claude Code

Run Claude Fable 5 with Claude Code: set the model via /model, settings.json, or ANTHROPIC_MODEL, verify it, and manage the 2x cost over Opus 4.8 wisely.

10 June 2026

Practice API Design-first in Apidog

Discover an easier way to build and use APIs

Git-native Collaboration for API Testing and Engineering