tsk-15: Add API documentation (#17)

Closes #15

Reviewed-on: phoenix/textsender-auth#17
Co-authored-by: phoenix <kundeng00@pm.me>
Co-committed-by: phoenix <kundeng00@pm.me>
This commit is contained in:
phoenix
2025-11-14 17:56:51 +00:00
committed by phoenix
parent 6f608b757c
commit 8a90448854
10 changed files with 675 additions and 1 deletions
+11
View File
@@ -18,3 +18,14 @@ make build
```
./textsender-auth -reset-db
```
Generate API documentation
```
go install github.com/swaggo/swag/cmd/swag@latest
go get -u github.com/swaggo/http-swagger/v2
swag init --generalInfo main.go --dir ./cmd/api,./internal/handler --output docs/ --parseDependency --parseInternal
```
The API documentation can be viewed from `http://localhost:9080/swagger/index.html`.