Bi-Directional Sync
Keep Your Spec and Project in Perfect Sync
Tigrister's bi-directional sync is a unique feature that keeps your OpenAPI spec and project state synchronized. Edit in the code editor or visual designer - changes flow both ways automatically.
Key Concepts
- • Change Detection - Tracks modifications across all spec sections
- • Change Application - Applies detected changes to project state
- • Conflict Resolution - Handles simultaneous edits intelligently
- • Extension Preservation - Keeps x-tigrister-* fields intact
How Bi-Directional Sync Works
The sync system monitors changes from multiple sources and keeps everything consistent.
Sync Flow
Change Sources
Changes can originate from four different sources, each tracked independently:
editorCode Editor
Direct YAML/JSON edits in the Monaco editor. Changes are parsed and synced on save or when switching views.
visualVisual Designer
Form-based edits to paths, parameters, schemas. Each field change triggers targeted updates to the spec.
importImport
Loading a new spec from file or URL. Replaces the entire spec and triggers full project synchronization.
projectProject Actions
Creating endpoints, moving modules, or other project-level operations. Changes reflect back to the spec.
Tracked Sections
The sync system monitors changes across all major OpenAPI sections:
| Section | Sync Target | Change Types |
|---|---|---|
| info | Project name, description | update |
| servers | Environment variables | add, update, delete |
| tags | Module organization | add, update, delete |
| paths | Endpoints (method, URL, params) | add, update, delete |
| schemas | Component schemas | add, update, delete |
| securitySchemes | Auth configuration | add, update, delete |
| security | Default auth requirements | update |
| webhooks | Webhook definitions | add, update, delete |
Change Detection
The system compares old and new spec states to generate a detailed ChangeSet.
ChangeSet Structure
Individual Change Entry
Conflict Resolution
When both sides modify the same item, Tigrister detects and resolves conflicts.
Conflict Detection
A conflict occurs when the same section:keyis modified in both source and target with different values.
Resolution Strategies
- source-winsEditor changes take precedence (default)
- target-winsVisual/project changes take precedence
- mergeDeep merge both changes when possible
- askPrompt user to choose
Smart Resolution Logic
Auto-Resolution
Tigrister can automatically resolve all conflicts using a chosen strategy:
Deep Merge Behavior
When using the merge strategy for paths/schemas:
- •Source properties are preserved (take precedence)
- •Target properties fill in gaps (where source is undefined)
- •Nested objects are recursively merged
- •Arrays are not merged (source array wins)
Sync Options
Customize sync behavior with these options:
preserveExtensions
When enabled, x-tigrister-* extensions (like assertions, auth configs) survive import and sync operations.
deleteOrphans
When enabled, items in the project that don't exist in the spec will be removed. Use with caution during import.
Team Workflows
Bi-directional sync enables effective team collaboration patterns.
1Spec-First Development
Design team defines API in code editor → Sync creates endpoints → QA team tests in Area Mode
2Visual Prototyping
Product defines endpoints in Visual Designer → Changes sync to spec → Developers export for codegen
3Live Import Update
Backend deploys new spec → Import updated spec → Sync merges with existing tests
Understanding Sync Results
Every sync operation returns a detailed result:
Success
All changes applied without conflicts.appliedChanges > 0
Partial
Some changes skipped due to conflicts.skippedChanges > 0
Failed
Sync failed completely.error contains details.
Sync Best Practices
Work in One View at a Time
Avoid simultaneous edits in code editor and visual designer to prevent conflicts.
Save Before Switching
Always save your changes before switching between editor views to ensure sync runs.
Use Extension Preservation
Keep preserveExtensions enabled to retain test assertions and auth configs.
Be Cautious with deleteOrphans
Only enable when importing a complete replacement spec. Otherwise you may lose project data.
Review Conflict Summaries
When conflicts occur, check the summary to understand what was merged or skipped.