A minimal example showing how to use camunda-schema-bundler to fetch, bundle, and inspect the Camunda REST API spec.
Install dependencies and start the example:
npm install
npm startThe
npm startscript automatically builds the parentcamunda-schema-bundlerpackage first (via aprestarthook), so this works from a fresh checkout without manually runningnpm run buildin the repo root.
This will:
- Fetch the upstream Camunda OpenAPI spec from
main - Bundle it into a single normalized JSON file
- Extract the metadata intermediate representation
- Generate an endpoint map showing which source file each API operation (method + path) came from
- Print a summary of the results
All output files are written to output/.
You can also run the bundler via CLI instead of the library API.
This requires that the upstream spec has already been fetched (e.g. by running npm start first):
npm run start:cliThe CLI bundles from output/upstream/ and writes to the same output/ directory.
| File | Description |
|---|---|
output/rest-api.bundle.json |
Single, normalized OpenAPI 3 JSON spec |
output/spec-metadata.json |
Metadata IR (semantic keys, unions, operations) |
output/endpoint-map.json |
Map of each API operation (method + path) → source YAML file |
output/upstream/ |
Raw fetched upstream spec files |
=== Bundle Stats ===
Paths: 140
Schemas: 511
Augmented: ...
Promoted: ...
Deduped: ...
=== Metadata ===
Semantic keys: ...
Unions: ...
Operations: ...
Eventually consistent: ...
=== Endpoint Map (140 endpoints) ===
process-instance.yaml (12 endpoints):
GET /process-instances
POST /process-instances
POST /process-instances/search
...
... and more source files
=== Output Files ===
output/rest-api.bundle.json (1234.5 KB)
output/spec-metadata.json (56.7 KB)
output/endpoint-map.json (8.9 KB)
Done!