Add OpenAPI/Swagger documentation
- Add Swagger dependencies to go.mod - Annotate all API endpoints with Swagger comments - Add Swagger UI at /api/v1/docs endpoint - Auto-generate Swagger docs in Dockerfile build - Update README with API documentation link
This commit is contained in:
1 parent
0019a4a095
commit
52ecc2fab5
7 files changed
+188
-8
No files matched your search
@@ -8,6 +8,8 @@ COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
RUN go run github.com/swaggo/swag/cmd/swag@latest init -g cmd/api/main.go
|
||||
RUN go mod tidy
|
||||
RUN CGO_ENABLED=1 GOOS=linux go build -a -installsuffix cgo -o apocapoc-api cmd/api/main.go
|
||||
|
||||
FROM alpine:latest
|
||||
|
||||
Reference in new issue
Block a user