Swag Docs
This commit is contained in:
		
							
								
								
									
										27
									
								
								cmd/main.go
									
									
									
									
									
								
							
							
						
						
									
										27
									
								
								cmd/main.go
									
									
									
									
									
								
							@@ -1,17 +1,25 @@
 | 
			
		||||
package main
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	configs "learnsteam/learsteam-quiz-api/configs"
 | 
			
		||||
	_ "learnsteam/learsteam-quiz-api/docs"
 | 
			
		||||
	"learnsteam/learsteam-quiz-api/internal/database"
 | 
			
		||||
	"learnsteam/learsteam-quiz-api/internal/helpers"
 | 
			
		||||
	"learnsteam/learsteam-quiz-api/internal/routers"
 | 
			
		||||
 | 
			
		||||
	"log"
 | 
			
		||||
	"net/http"
 | 
			
		||||
 | 
			
		||||
	configs "studioj/boilerplate_go/configs"
 | 
			
		||||
	"studioj/boilerplate_go/internal/database"
 | 
			
		||||
	"studioj/boilerplate_go/internal/helpers"
 | 
			
		||||
	"studioj/boilerplate_go/internal/routers"
 | 
			
		||||
 | 
			
		||||
	"github.com/apex/gateway"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// @title Learsteam Quiz API
 | 
			
		||||
// @version 1.0
 | 
			
		||||
// @description Learnsteam Quiz 서비스 API
 | 
			
		||||
 | 
			
		||||
// @contact.name Jay Sheen
 | 
			
		||||
// @contact.email sheen@jongyeob.com
 | 
			
		||||
 | 
			
		||||
func main() {
 | 
			
		||||
	Init()
 | 
			
		||||
	Run()
 | 
			
		||||
@@ -20,6 +28,7 @@ func main() {
 | 
			
		||||
func Init() {
 | 
			
		||||
	database.Init()
 | 
			
		||||
	routers.Init()
 | 
			
		||||
 | 
			
		||||
	database.AutoMigrate()
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -30,3 +39,11 @@ func Run() {
 | 
			
		||||
		log.Fatal(http.ListenAndServe(configs.PORT, routers.Router))
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func InitSwagger() {
 | 
			
		||||
	// swagger:route GET /health health
 | 
			
		||||
	// Check server health
 | 
			
		||||
	//
 | 
			
		||||
	// responses:
 | 
			
		||||
	//   200: healthResponse
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user