RezinaLMS-BackEnd/internal/web_server/handlers/swagger_service_info.go

31 lines
890 B
Go

package handlers
// Documentation-only declarations for the anonymous service discovery handlers
// registered in routes.go. These functions are not runtime handlers.
type serviceInfoResponse struct {
Message string `json:"message" example:"Welcome to Rezina Backend API"`
Version string `json:"version" example:"1.0.1"`
}
type apiIndexResponse struct {
AdminAPI string `json:"admin_api" example:"/api/v1/admin"`
ClientAPI string `json:"client_api" example:"/api/v1"`
}
// documentServiceInfo godoc
// @Summary Service welcome and version
// @Tags discovery
// @Produce json
// @Success 200 {object} serviceInfoResponse
// @Router / [get]
func documentServiceInfo() {}
// documentAPIIndex godoc
// @Summary Discover the admin and customer API roots
// @Tags discovery
// @Produce json
// @Success 200 {object} apiIndexResponse
// @Router /api/v1/ [get]
func documentAPIIndex() {}