Calimero Core Server OpenAPI Specifications
January 23, 2026 ยท View on GitHub
This repository hosts OpenAPI specifications for Calimero Network services. It is used by CI checks in other repositories to detect breaking changes in API contracts.
๐ New to using OpenAPI specs? See CLIENT_USAGE.md for detailed examples of how clients can use these specs.
๐ View Interactive Documentation: GitHub Pages - Browse all API specifications with interactive visualizations.
Quick Start
For Clients (Consuming APIs)
# 1. Fetch the spec
curl -O https://raw.githubusercontent.com/calimero-network/core-server-open-api/main/specs/core-server/openapi.yaml
# 2. Generate client code (TypeScript example)
npx @openapitools/openapi-generator-cli generate \
-i openapi.yaml \
-g typescript-axios \
-o src/generated/client
# 3. Use the generated client
import { CalimeroNodeClient } from './generated/client';
const client = new CalimeroNodeClient({ baseURL: 'http://localhost:8080' });
See CLIENT_USAGE.md for complete examples in multiple languages.
For Server Implementations
# 1. Checkout specs as submodule
git submodule add git@github.com:calimero-network/core-server-open-api.git openapi-specs
# 2. Validate your implementation
npx @apidevtools/swagger-cli validate openapi-specs/specs/core-server/openapi.yaml
# 3. Check for breaking changes in CI
bash openapi-specs/scripts/check-breaking-changes.sh \
openapi-specs/specs/core-server/openapi.yaml \
your-spec.yaml
Repository Structure
.
โโโ specs/ # OpenAPI specification files
โ โโโ core-server/ # Core server API specs
โ โ โโโ openapi.yaml # Main core server OpenAPI spec
โ โโโ registry/ # Registry API specs
โ โโโ api.yml # Registry API OpenAPI spec
โโโ scripts/ # Utility scripts
โ โโโ check-breaking-changes.sh # Breaking change detection script
โ โโโ generate-docs.mjs # Generate GitHub Pages documentation
โโโ examples/ # Example code
โ โโโ typescript-client-example.ts
โ โโโ python-client-example.py
โ โโโ ci-workflow-example.yml
โโโ .github/
โ โโโ workflows/
โ โโโ ci.yml # CI workflow for validation
โ โโโ pages.yml # GitHub Pages deployment workflow
โ โโโ example-usage.yml # Example for other repos
โโโ docs/ # Generated documentation (gitignored, generated in CI)
โ โโโ index.html # Documentation index page
โ โโโ core-server.html # Core Server API visualization
โ โโโ registry.html # Registry API visualization
โโโ CLIENT_USAGE.md # Detailed client usage guide
โโโ CONTRIBUTING.md # Contribution guidelines
โโโ QUICKSTART.md # Quick start guide
โโโ README.md # This file
Purpose
This repository serves as the source of truth for OpenAPI specifications across the Calimero Network ecosystem. Other repositories can:
- Reference these specs to ensure API compatibility
- Validate their implementations against these specs
- Detect breaking changes before merging PRs
- Generate client code in multiple languages
- Ensure type safety across the stack
Usage in Other Repositories
Adding CI Checks
Add a workflow step to your repository that validates against the specs in this repo:
- name: Check API Breaking Changes
uses: actions/checkout@v4
with:
repository: calimero-network/core-server-open-api
path: openapi-specs
token: ${{ secrets.GITHUB_TOKEN }}
- name: Validate OpenAPI Spec
run: |
npx @apidevtools/swagger-cli validate openapi-specs/specs/core-server/openapi.yaml
- name: Check for Breaking Changes
run: |
# Replace with your actual spec path
bash openapi-specs/scripts/check-breaking-changes.sh \
openapi-specs/specs/core-server/openapi.yaml \
./your-api-spec.yaml # TODO: Update this path
See examples/ci-workflow-example.yml for a complete workflow.
Using as a Git Submodule
git submodule add git@github.com:calimero-network/core-server-open-api.git openapi-specs
Then reference the specs in your CI:
- name: Check Breaking Changes
run: |
bash openapi-specs/scripts/check-breaking-changes.sh \
openapi-specs/specs/core-server/openapi.yaml \
./your-spec.yaml
Breaking Change Detection
The scripts/check-breaking-changes.sh script helps detect breaking changes by comparing specs:
- Removed endpoints
- Removed request/response fields
- Changed field types
- Changed required fields
- Removed response codes
Running Locally
# Install dependencies
npm install
# Check breaking changes
bash scripts/check-breaking-changes.sh \
specs/core-server/openapi.yaml \
/path/to/new/spec.yaml
Contributing
Adding a New Spec
- Add your OpenAPI spec to
specs/<service-name>/ - Ensure it follows OpenAPI 3.0+ format
- Validate it using
npx @apidevtools/swagger-cli validate - Update
scripts/generate-docs.mjsto include your new spec in thespecsarray - Update this README if needed
- Documentation will be automatically generated and published to GitHub Pages on merge
Updating Existing Specs
- Make your changes to the spec file
- Run validation:
npm run validate - Check for breaking changes:
npm run check-breaking-changes - Submit a PR with clear description of changes
Versioning
- Use semantic versioning in the
info.versionfield - Breaking changes should increment the major version
- Non-breaking changes increment minor or patch versions
CI Workflow
This repository has a CI workflow that:
- Validates all OpenAPI specs
- Checks for syntax errors
- Ensures specs are well-formed
- Runs on every push and PR
Tools Used
- swagger-cli - OpenAPI validation
- @redocly/cli - OpenAPI linting and validation (can be extended for breaking change detection)
- openapi-generator - Client code generation
- spectral - OpenAPI linting (optional)
Interactive Documentation
All OpenAPI specifications are automatically published to GitHub Pages with interactive visualizations:
- Core Server API Docs - Complete API documentation for the Calimero Node Server
- Registry API Docs - API documentation for the Calimero SSApp Registry
- Documentation Index - Browse all available API specifications
The documentation is automatically regenerated on every push to the main branch.
Local Preview
Generate and preview the documentation locally:
# Generate documentation
npm run docs:generate
# Preview locally
npm run docs:preview
Documentation
- CLIENT_USAGE.md - Complete guide on how clients use these specs
- CONTRIBUTING.md - Contribution guidelines
- QUICKSTART.md - Quick start guide
- examples/ - Code examples in multiple languages
License
Same as the main Calimero Network repository.