Documentation for the Visonic/Tyco/JC PowerLink JSON‑RPC API. This repository defines the API using the OpenRPC specification and includes a minimal build script to aggregate per‑method JSON files into a single OpenRPC document.
- Modular OpenRPC method files under
./methods
with sharedinfo.json
. - One‑command local build: generates
openrpc.build.json
from the method files. - Optional live build during authoring via
nodemon
(watchesmethods/
andinfo.json
). - GitHub Actions workflow that builds and publishes the generated
openrpc.build.json
to thedist
branch.
- Node.js 20+ recommended
npm install
This command scans methods/
and produces openrpc.build.json
at the repo root:
node generate.js
The console should print:
✅ Built openrpc.build.json
Continuously rebuild the spec whenever files change:
npm run dev
Watched files:
methods/*.json
info.json
The build output is a single file: openrpc.build.json
.
You can:
- Paste the spec into https://playground.open-rpc.org
On pushes to main
, GitHub Actions will build and force‑push the latest openrpc.build.json
to the dist
branch. You can consume that raw file directly from GitHub (e.g., https://raw.githubusercontent.com/<OWNER>/<REPO>/dist/openrpc.build.json
).
- Add a new method by creating a JSON file under
methods/
(see existing files for structure:name
,summary
,description
,params
,result
, andexamples
). - Modify
info.json
to change the title, version, or description for the whole document. - Run
node generate.js
(ornpm run dev
to watch) to rebuild. The script will include every*.json
file inmethods/
.
MIT License. See LICENSE
file.