Skip to content

Commit 60a7829

Browse files
authored
feat: add Swagger documentation and registration endpoint (#1)
* feat: add Swagger documentation and registration endpoint - Implemented Swagger initialization in the Makefile and main.go - Created Swagger documentation for the Portfolio Builder API - Added RegisterInput, RegisterResponse, and ErrorResponse models - Enhanced the Register handler with Swagger annotations - Updated routes to include Swagger UI endpoint * feat: add health check endpoint with Swagger documentation * feat: add CRUD operations and export functionality for projects with Swagger documentation * docs: update README to include API documentation section with Swagger link * feat: add health check endpoint and update API paths in Swagger documentation
1 parent e8b4ae4 commit 60a7829

File tree

15 files changed

+1814
-3
lines changed

15 files changed

+1814
-3
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ run: build
1515
dev:
1616
air
1717

18+
swagger:
19+
swag init -g cmd/main.go
20+
1821
clean:
1922
rm -rf $(BIN_DIR)
2023

cmd/main.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,15 @@ import (
99
"portfolio-backend/internal/routes"
1010

1111
"github.com/gin-gonic/gin"
12+
13+
_ "portfolio-backend/docs"
1214
)
1315

16+
// @title Portfolio Builder API
17+
// @version 1.0
18+
// @description Uma API open source para o gerenciamento de portfólios de desenvolvedores.
19+
// @host localhost:8080
20+
// @BasePath /api
1421
func main() {
1522
config.LoadEnv()
1623

0 commit comments

Comments
 (0)