Skip to content

Commit 9810fa0

Browse files
committed
chore: cleaning up go.mod
Signed-off-by: Willian Paixao <[email protected]>
1 parent 0f565e0 commit 9810fa0

File tree

4 files changed

+66
-1274
lines changed

4 files changed

+66
-1274
lines changed

docs/README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Prysm Custom API Documentation
2+
3+
This directory contains Swagger 2.0 documentation for Prysm's custom beacon node API endpoints.
4+
5+
## Files
6+
7+
- `swagger.json` - OpenAPI 2.0 specification in JSON format
8+
- `swagger.yaml` - OpenAPI 2.0 specification in YAML format
9+
10+
## Viewing the Documentation
11+
12+
You can view the API documentation using any Swagger UI viewer:
13+
14+
1. **Online Swagger Editor**: Upload `swagger.json` to [editor.swagger.io](https://editor.swagger.io/)
15+
2. **Swagger UI Docker**:
16+
```bash
17+
docker run -p 8080:8080 -e SWAGGER_JSON=/docs/swagger.json -v $(pwd)/docs:/docs swaggerapi/swagger-ui
18+
```
19+
3. **VS Code Extension**: Use the "OpenAPI (Swagger) Editor" extension
20+
21+
## Regenerating the Documentation
22+
23+
The swagger files are generated from Go annotations in the source code using the [swag](https://github.com/swaggo/swag) CLI tool.
24+
25+
### Prerequisites
26+
27+
Install swag CLI:
28+
29+
```bash
30+
go install github.com/swaggo/swag/cmd/swag@latest
31+
```
32+
33+
### Generate Swagger Files
34+
35+
From the repository root:
36+
37+
```bash
38+
swag init -g beacon-chain/rpc/prysm/doc.go -o docs/ --parseDependency --parseInternal
39+
```

0 commit comments

Comments
 (0)