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:
TsMask
2025-08-21 14:30:09 +08:00
parent a72aa00f89
commit 45e226ce1a
171 changed files with 1177 additions and 741 deletions

View File

@@ -0,0 +1,39 @@
// 网元UDM服务可能是8080、33030端口服务
// 融合的UDM网元视情况调整。
package fetchlink
import (
"encoding/json"
"fmt"
"strings"
"be.ems/src/framework/logger"
"be.ems/src/framework/utils/fetch"
)
// UDMImportAuth UDM导入鉴权数据
//
// data参数 {path:"服务器文件路径", k4:"可选k4为空时Ki不加密。"}
func UDMImportAuth(udmIP string, data map[string]any) (string, error) {
// 网元参数配置新增array
neUrl := fmt.Sprintf("http://%s:8080/ue-manage/v1/import-auth", udmIP)
resBytes, err := fetch.PostJSON(neUrl, data, nil)
var resData map[string]string
if err != nil {
errStr := err.Error()
logger.Warnf("UDMImportAuth Post \"%s\"", neUrl)
logger.Errorf("UDMImportAuth %s", errStr)
return "", fmt.Errorf("NeService UDM API Error")
}
// 序列化结果
if err = json.Unmarshal(resBytes, &resData); err != nil {
logger.Errorf("UDMImportAuth Unmarshal %s", err.Error())
return "", err
}
if v, ok := resData["code"]; ok && v == "00000" {
return strings.TrimSpace(strings.ToLower(resData["message"])), nil
}
return "", fmt.Errorf("%s", resData["message"])
}