Please ensure that your Apidog version is β₯2.7.29.
Apidog supports automatically backing up the OpenAPI / Swagger files for each module in a project to a Git repository. GitHub and GitLab are currently supported.Feature Overview#
Automatically back up the OpenAPI / Swagger file for each module in Apidog to a GitHub repository
Automatically back up the OpenAPI / Swagger file for each module in Apidog to a GitLab repository
Backups are performed during off-peak hours at night (the exact time is not fixed and is randomly scheduled during idle periods)
Creating a Git Repository Connection#
1.
Navigate to Settings β Git Connections
π· Visual Reference
2.
Click New Connection, then log in to the corresponding source code management platform after being redirected.
3.
Fill in the configuration details:GitHub: Name, Description, GitHub Organization, GitHub Repository
GitLab: Name, Description, GitLab Group, GitLab Project
π· Visual Reference
4.
Save the repository connection configuration.
Enabling Automatic Backup#
1.
In the module you want to back up, go to Overview β API Specification and add an OAS.
π· Visual Reference
2.
Enable Backup to Git Repository.
3.
Configure the following settings:Git Repository Connection (select a previously created connection)
Target File Path (the location where the OpenAPI Spec file will be stored in the repository)
π· Visual Reference
Once saved, the system will automatically push the OpenAPI Spec file for that module to the specified Git repository during a random off-peak time at night.π· Visual Reference
Import OpenAPI/Swagger Files#
You can import OpenAPI/Swagger files from GitHub or GitLab repositories. In Settings β Bind Data Sources, select Git Repository as the data source.π· Visual Reference