📝 docs: add comprehensive API documentation 📦 dependencies: add swaggo/swag to go.mod 🔧 chore: add go:generate directive for documentation - Add comprehensive API documentation using swaggo/swag - Embed OpenAPI spec in binary using go:embed - Add Swagger UI at /swagger/ - Document all endpoints, models, and validation rules - Add go:generate directive for easy regeneration - Update README, AGENTS, CHANGELOG with documentation - Finalize ADR 0013 with implementation details - Gitignore generated docs directory Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
46 lines
1.1 KiB
Go
46 lines
1.1 KiB
Go
// Package main provides the DanceLessonsCoach server entry point
|
|
//
|
|
// @title DanceLessonsCoach API
|
|
// @version 1.0
|
|
// @description API for DanceLessonsCoach service providing greeting functionality
|
|
// @termsOfService http://swagger.io/terms/
|
|
|
|
// @contact.name API Support
|
|
// @contact.url http://www.dance-lessons-coach.com/support
|
|
// @contact.email support@dance-lessons-coach.com
|
|
|
|
// @license.name MIT
|
|
// @license.url https://opensource.org/licenses/MIT
|
|
|
|
// @host localhost:8080
|
|
// @BasePath /api
|
|
// @schemes http https
|
|
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
|
|
"DanceLessonsCoach/pkg/config"
|
|
"DanceLessonsCoach/pkg/server"
|
|
"github.com/rs/zerolog/log"
|
|
)
|
|
|
|
func main() {
|
|
// Load configuration (this will also setup logging)
|
|
cfg, err := config.LoadConfig()
|
|
if err != nil {
|
|
log.Fatal().Err(err).Msg("Failed to load configuration")
|
|
}
|
|
|
|
// Create readiness context to control readiness state
|
|
readyCtx, readyCancel := context.WithCancel(context.Background())
|
|
defer readyCancel()
|
|
|
|
// Create and run server
|
|
server := server.NewServer(cfg, readyCtx)
|
|
if err := server.Run(); err != nil {
|
|
log.Fatal().Err(err).Msg("Server failed")
|
|
}
|
|
}
|