You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: api/README.md
+30Lines changed: 30 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,13 @@ Defines the core data structures and types used throughout the API. This include
19
19
- Custom error types
20
20
- Shared interfaces
21
21
22
+
#### `/docs`
23
+
Contains Swagger-generated API documentation. This includes:
24
+
- API endpoint definitions
25
+
- Request/response schemas
26
+
- Authentication methods
27
+
- API operation descriptions
28
+
22
29
#### `/pkg`
23
30
Contains shared utilities and helper packages that provide common functionality used across different parts of the API. This includes both general-purpose utilities and domain-specific helpers.
24
31
@@ -82,3 +89,26 @@ Provides a client library for interacting with the API. The client package imple
82
89
The API package is designed to be used as part of the larger Embedded Cluster system. It provides both HTTP endpoints for external access and a client library for internal use.
83
90
84
91
For integration examples and usage patterns, refer to the integration tests in the `/integration` directory.
92
+
93
+
## Generating the Docs
94
+
95
+
The API documentation is generated using Swagger. To generate or update the docs:
96
+
97
+
1. Ensure the `swag` tool is installed:
98
+
```
99
+
make swag
100
+
```
101
+
102
+
2. Generate the Swagger documentation:
103
+
```
104
+
make swagger
105
+
```
106
+
107
+
This will scan the codebase for Swagger annotations and generate the API documentation files in the `/docs` directory.
108
+
109
+
Once the API is running, the Swagger documentation is available at the endpoint:
110
+
```
111
+
/api/swagger/
112
+
```
113
+
114
+
You can use this interactive documentation to explore the available endpoints, understand request/response formats, and test API operations directly from your browser.
0 commit comments