Skip to content

Commit

Permalink
chore: Document OpenRPC API and schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
bgins committed Feb 13, 2024
1 parent d4d196c commit 590135a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ represents the `Homestar` runtime. We recommend diving into each package's own
writing and compiling [Wasm component][wasm-component] modules using
[wit-bindgen][wit-bindgen].

- [homestar-schemas](./homestar-schemas)

`homestar-schemas` is a crate for generating OpenRPC docs and JSON Schemas that document the [homestar-runtime](./homestar-runtime) JSON-RPC API, workflows, and receipts.

- [examples/*](./examples)

`examples` contains examples and demos showcasing `Homestar` packages
Expand Down
14 changes: 14 additions & 0 deletions homestar-runtime/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,17 @@ and failure modes, etc.
For more information, please go to our [Homestar Readme][homestar-readme].

[homestar-readme]: https://github.com/ipvm-wg/homestar/blob/main/README.md

## API

The runtime provides a JSON-RPC API to run workflows, request node information, health, and metrics, and to subscribe to network notifications. The OpenRPC API is documented in [api.json][api] and is available on the `rpc_discover` endpoint.

JSON Schemas for [workflow][workflow-schema], [receipt][receipt-schema], [network notifications][network-schema], [health checks][health-schema], [node info][node-info-schema], and [metrics][metrics-schema] are also available inidividually.

[api]: ./schemas/api.json
[health-schema]: ./schemas/health.json
[metrics-schema]: ./schemas/metrics.json
[network-schema]: ./schemas/network.json
[node-info-schema]: ./schemas/node_info.json
[receipt-schema]: ./schemas/receipt.json
[workflow-schema]: ./schemas/workflow.json

0 comments on commit 590135a

Please sign in to comment.