perbaikan tool generete
This commit is contained in:
@@ -27,7 +27,7 @@ func NewPesertaHandler(cfg config.BpjsConfig) *PesertaHandler {
|
||||
// GetPesertaByNIK godoc
|
||||
// @Summary Get participant data by NIK
|
||||
// @Description Search participant data based on Population NIK and service date
|
||||
// @Tags bpjs
|
||||
// @Tags BPJS
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param nik path string true "NIK KTP"
|
||||
|
||||
@@ -63,7 +63,7 @@ func NewRetribusiHandler() *RetribusiHandler {
|
||||
// GetRetribusi godoc
|
||||
// @Summary Get retribusi with pagination and optional aggregation
|
||||
// @Description Returns a paginated list of retribusis with optional summary statistics
|
||||
// @Tags retribusi
|
||||
// @Tags Retribusi
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param limit query int false "Limit (max 100)" default(10)
|
||||
@@ -181,7 +181,7 @@ func (h *RetribusiHandler) GetRetribusi(c *gin.Context) {
|
||||
// GetRetribusiByID godoc
|
||||
// @Summary Get Retribusi by ID
|
||||
// @Description Returns a single retribusi by ID
|
||||
// @Tags retribusi
|
||||
// @Tags Retribusi
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param id path string true "Retribusi ID (UUID)"
|
||||
@@ -229,7 +229,7 @@ func (h *RetribusiHandler) GetRetribusiByID(c *gin.Context) {
|
||||
// GetRetribusiDynamic godoc
|
||||
// @Summary Get retribusi with dynamic filtering
|
||||
// @Description Returns retribusis with advanced dynamic filtering like Directus
|
||||
// @Tags retribusi
|
||||
// @Tags Retribusi
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param fields query string false "Fields to select (e.g., fields=*.*)"
|
||||
@@ -496,7 +496,7 @@ func (h *RetribusiHandler) SearchRetribusiAdvanced(c *gin.Context) {
|
||||
// CreateRetribusi godoc
|
||||
// @Summary Create retribusi
|
||||
// @Description Creates a new retribusi record
|
||||
// @Tags retribusi
|
||||
// @Tags Retribusi
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param request body modelsretribusi.RetribusiCreateRequest true "Retribusi creation request"
|
||||
@@ -550,7 +550,7 @@ func (h *RetribusiHandler) CreateRetribusi(c *gin.Context) {
|
||||
// UpdateRetribusi godoc
|
||||
// @Summary Update retribusi
|
||||
// @Description Updates an existing retribusi record
|
||||
// @Tags retribusi
|
||||
// @Tags Retribusi
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param id path string true "Retribusi ID (UUID)"
|
||||
@@ -614,7 +614,7 @@ func (h *RetribusiHandler) UpdateRetribusi(c *gin.Context) {
|
||||
// DeleteRetribusi godoc
|
||||
// @Summary Delete retribusi
|
||||
// @Description Soft deletes a retribusi by setting status to 'deleted'
|
||||
// @Tags retribusi
|
||||
// @Tags Retribusi
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param id path string true "Retribusi ID (UUID)"
|
||||
@@ -662,7 +662,7 @@ func (h *RetribusiHandler) DeleteRetribusi(c *gin.Context) {
|
||||
// GetRetribusiStats godoc
|
||||
// @Summary Get retribusi statistics
|
||||
// @Description Returns comprehensive statistics about retribusi data
|
||||
// @Tags retribusi
|
||||
// @Tags Retribusi
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param status query string false "Filter statistics by status"
|
||||
|
||||
@@ -7,12 +7,13 @@ import (
|
||||
healthcheckHandlers "api-service/internal/handlers/healthcheck"
|
||||
bpjsPesertaHandlers "api-service/internal/handlers/reference"
|
||||
retribusiHandlers "api-service/internal/handlers/retribusi"
|
||||
swaggerHandlers "api-service/internal/handlers/swagger"
|
||||
"api-service/internal/middleware"
|
||||
services "api-service/internal/services/auth"
|
||||
"api-service/pkg/logger"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
swaggerFiles "github.com/swaggo/files"
|
||||
ginSwagger "github.com/swaggo/gin-swagger"
|
||||
)
|
||||
|
||||
func RegisterRoutes(cfg *config.Config) *gin.Engine {
|
||||
@@ -41,11 +42,8 @@ func RegisterRoutes(cfg *config.Config) *gin.Engine {
|
||||
sistem := router.Group("/api/sistem")
|
||||
sistem.GET("/health", healthCheckHandler.CheckHealth)
|
||||
|
||||
// Initialize Swagger handler
|
||||
swaggerHandler := swaggerHandlers.NewHandler(cfg)
|
||||
|
||||
// Register Swagger routes
|
||||
swaggerHandler.RegisterRoutes(router)
|
||||
// Swagger UI route
|
||||
router.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
|
||||
|
||||
// API v1 group
|
||||
v1 := router.Group("/api/v1")
|
||||
@@ -70,6 +68,7 @@ func RegisterRoutes(cfg *config.Config) *gin.Engine {
|
||||
// BPJS endpoints
|
||||
bpjsPesertaHandler := bpjsPesertaHandlers.NewPesertaHandler(cfg.Bpjs)
|
||||
v1.GET("/bpjs/peserta/nik/:nik/tglSEP/:tglSEP", bpjsPesertaHandler.GetPesertaByNIK)
|
||||
|
||||
// ============= PUBLISHED ROUTES ===============================================
|
||||
|
||||
// // Retribusi endpoints
|
||||
|
||||
Reference in New Issue
Block a user