Repository navigation
Commit 51bed95
feat: Add Swagger and Postman support (#5)
This commit introduces Swagger UI for interactive API documentation and a Postman collection for easy API testing.
- Adds `swagger-ui-express` and `swagger-jsdoc` to handle documentation generation and serving.
- Implements JSDoc comments across all API routes in `src/routes/api.js` to define the API specification.
- Creates a new endpoint, `/api-docs`, to serve the interactive Swagger UI. The UI is pre-configured to use the master API key for immediate testing.
- Generates a `whatsapp_api_collection.json` file in the root directory. The collection includes all endpoints and a pre-request script to manage the `X-MASTER-KEY` header automatically.
- Updates `README.md` with a new "API Documentation" section, explaining how to access the Swagger UI and import the Postman collection.
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>1 parent 0bee942 commit 51bed95
8 files changed
Lines changed: 728 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
145 | 167 | | |
146 | 168 | | |
147 | 169 | | |
| |||
0 commit comments