Skip to content

API Spec Synchronization ​

diid supports three methods for syncing API specifications: manual upload, pull-based fetching, and push-based sync.


Specifications Overview ​

  • Supported Formats: OpenAPI, AsyncAPI, GraphQL, and SOAP/WSDL (YAML, JSON, or XML).
  • File Size Limit: Up to 10 MB per specification file.
  • Automatic Detection: diid automatically detects spec formats and parses definitions upon upload or fetch.

1. Manual Upload ​

Upload specifications directly through the web console:

  1. Open your project page and click Upload Spec.
  2. Paste the spec contents or select a local file.
  3. Click Publish. The spec is validated immediately, and a new version is created if changes are detected.

2. Pull-Based Sync ​

Configure diid to periodically pull specification files from a hosted HTTPS URL (e.g., an /openapi.json endpoint).

Setup ​

  1. In project settings, enter the Source URL.
  2. Add any required HTTP authentication headers (e.g., Authorization: Bearer <token>).
  3. Save your configuration. diid validates the URL immediately and periodically checks for updates.

3. Push-Based Sync (diid-push CLI) ​

For applications behind firewalls or inside private networks, use the diid-push CLI to push specs to diid from your build or CI pipelines.

Setup ​

  1. Enable push sync under Project Settings $\rightarrow$ Spec Sync $\rightarrow$ Push to generate a project push token.
  2. Configure diid-push in your CI/CD pipeline using the push token to authenticate updates.

Refer to the diid-push repository for CLI setup instructions and deployment templates.