Appearance
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:
- Open your project page and click Upload Spec.
- Paste the spec contents or select a local file.
- 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
- In project settings, enter the Source URL.
- Add any required HTTP authentication headers (e.g.,
Authorization: Bearer <token>). - 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
- Enable push sync under Project Settings $\rightarrow$ Spec Sync $\rightarrow$ Push to generate a project push token.
- Configure
diid-pushin your CI/CD pipeline using the push token to authenticate updates.
Refer to the diid-push repository for CLI setup instructions and deployment templates.