Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,8 @@ engram/
|-------|-------------|
| [docs/architecture.md](docs/architecture.md) | System design, data flows, Arweave integration |
| [docs/miner.md](docs/miner.md) | Miner setup, configuration, systemd, Docker |
| [docs/openapi.json](docs/openapi.json) | OpenAPI 3.1 spec for miner HTTP endpoints |
| [docs/miner-openapi.html](docs/miner-openapi.html) | Redoc viewer for the miner HTTP API |
| [docs/validator.md](docs/validator.md) | Validator setup and scoring loop |
| [docs/sdk.md](docs/sdk.md) | Python SDK full reference |
| [docs/cli.md](docs/cli.md) | CLI command reference |
Expand Down
12 changes: 12 additions & 0 deletions docs/miner-openapi.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Engram Miner HTTP API</title>
</head>
<body>
<redoc spec-url="./openapi.json"></redoc>
<script src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"></script>
</body>
</html>
17 changes: 17 additions & 0 deletions docs/miner.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,23 @@ curl http://localhost:8091/health

---

## HTTP API Reference

The miner HTTP API is documented as OpenAPI 3.1 in [`openapi.json`](openapi.json).
Browse it locally through the Redoc page at [`miner-openapi.html`](miner-openapi.html).

Regenerate the spec after changing miner routes:

```bash
python scripts/generate_openapi.py
python scripts/generate_openapi.py --check
```

The OpenAPI generator reads the same route registry used by `neurons/miner.py`,
so CI can catch stale docs when an endpoint is added, removed, or renamed.

---

## systemd Service

```ini
Expand Down
Loading