Refactor API tags in swagger.yaml to use shortened prefixes
- Updated tags from 'network_data' to 'ne_data' for consistency and brevity. - Changed 'network_element' to 'ne' across various endpoints for improved readability. - Adjusted related descriptions in the tags section to reflect the new naming conventions.
This commit is contained in:
47
src/modules/core/core.go
Normal file
47
src/modules/core/core.go
Normal file
@@ -0,0 +1,47 @@
|
||||
package core
|
||||
|
||||
import (
|
||||
"be.ems/src/framework/logger"
|
||||
"be.ems/src/framework/middleware"
|
||||
"be.ems/src/framework/middleware/collectlogs"
|
||||
"be.ems/src/modules/core/controller"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// 模块路由注册
|
||||
func Setup(router *gin.Engine) {
|
||||
logger.Infof("开始加载 ====> core 模块路由")
|
||||
|
||||
// 核心网信息
|
||||
coreInfoGroup := router.Group("/core/info")
|
||||
{
|
||||
coreInfoGroup.GET("/list",
|
||||
middleware.AuthorizeUser(nil),
|
||||
controller.NewCoreInfo.List,
|
||||
)
|
||||
coreInfoGroup.GET("/:id",
|
||||
middleware.CryptoApi(false, true),
|
||||
middleware.AuthorizeUser(nil),
|
||||
controller.NewCoreInfo.Info,
|
||||
)
|
||||
coreInfoGroup.POST("",
|
||||
middleware.CryptoApi(true, true),
|
||||
middleware.AuthorizeUser(nil),
|
||||
collectlogs.OperateLog(collectlogs.OptionNew("log.operate.title.coreInfo", collectlogs.BUSINESS_TYPE_INSERT)),
|
||||
controller.NewCoreInfo.Add,
|
||||
)
|
||||
coreInfoGroup.PUT("",
|
||||
middleware.CryptoApi(true, true),
|
||||
middleware.AuthorizeUser(nil),
|
||||
collectlogs.OperateLog(collectlogs.OptionNew("log.operate.title.coreInfo", collectlogs.BUSINESS_TYPE_UPDATE)),
|
||||
controller.NewCoreInfo.Edit,
|
||||
)
|
||||
coreInfoGroup.DELETE(":id",
|
||||
middleware.AuthorizeUser(nil),
|
||||
collectlogs.OperateLog(collectlogs.OptionNew("log.operate.title.coreInfo", collectlogs.BUSINESS_TYPE_DELETE)),
|
||||
controller.NewCoreInfo.Remove,
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user