Spec-first Mode is for teams that want API specification files to be the source of truth. In this mode, you design and maintain OpenAPI or Swagger files directly in Apidog, preview the generated API documentation as you edit, and keep the files synchronized with Git.Use Spec-first Mode when your team already works with YAML or JSON specification files, reviews API changes through Git, or wants API design to fit naturally into a code repository workflow.
In a regular Apidog project, APIs are usually created and edited through visual forms. In a Spec-first project, the primary workspace is file-based.You work with files such as:
openapi.yaml
openapi.json
Swagger 2.0 files
Markdown files and other supporting project files
Apidog parses the specification files and turns them into a navigable API structure. You can edit the raw files, use supported visual forms, validate the specification, preview generated documentation, and push changes back to Git.
In the project type selector, choose Spec-first Mode.
3
Connect a Git provider, such as GitHub, GitLab, Azure DevOps, or Bitbucket.
4
Select an organization or workspace, then choose an existing repository or create a new repository if the option is available.
5
Select the main branch Apidog should synchronize with.
6
Choose whether to install a webhook.Installing a webhook allows pushes in the Git repository to trigger automatic synchronization. This usually requires admin permission on the repository. If you do not have admin permission, you can skip webhook installation and sync manually.
7
Enter the project name, configure member permissions, and click Create.
After creation, Apidog performs the first synchronization. If the repository's default branch is not main, Apidog uses the repository branch name for the project main branch.
Spec-first projects do not include sample project data. The API content comes from your specification files.
Spec-first projects include a Specs workspace in the left sidebar. This is the main place to manage specification files and Git sync.
The workspace contains three main areas:
File explorer: Browse and manage files and folders from the synchronized repository.
API structure tree: Navigate parsed OpenAPI content, such as overview, endpoints, schemas, and definitions.
Editor: Edit files in code view or, for supported OpenAPI nodes, in form view.
When you select an endpoint, schema, or other supported node in the structure tree, Apidog opens the related part of the source file. This lets you move between the file-level view and the API-level view without leaving the Specs workspace.
For supported OpenAPI nodes, Apidog also provides a Form view. This lets you edit common API fields through structured controls while keeping the underlying specification file as the source of truth.
Form view is available for supported nodes such as:
API overview
Endpoints
Schemas
Definitions
If the selected file or node cannot be edited in form view, Apidog keeps you in code view.
The Validation panel shows issues detected in the current specification, including warnings and errors. The validation badge displays the total number of detected issues.
Use this panel to find syntax problems, missing required fields, and rule violations before committing changes.
Spec-first Mode supports branch-based collaboration. Apidog maps synchronized Git branches to project branches so you can switch between versions of the specification.
If a branch exists in Git but has not been imported into Apidog, click Import New Branch, select the branch, and import it. Apidog then starts tracking and synchronizing that branch.
If a branch sync fails or the files look out of date, use Re-sync in Project Settings > Git & Branches. This resets the sync state for that branch and imports the files again.
Some Spec-first projects may use Apidog's internal storage instead of an external Git repository.These projects still use the Specs workspace, file-based editing, validation, preview, and branch management.The UI labels are slightly different:
Git Pull appears as Sync.
Commit & Push appears as Save.
Git provider information and external webhook settings are hidden.