Loading go-apps/meep-app-enablement/server/app-support/app-support.go +39 −0 Original line number Diff line number Diff line Loading @@ -704,6 +704,17 @@ func appRegistrationPOST(w http.ResponseWriter, r *http.Request) { } } if appInfo.AppProfile.EasId == "" { log.Error("Mandatory easId parameter should be present") errHandlerProblemDetails(w, "Mandatory attribute easId is missing in the request body.", http.StatusBadRequest) return } if appInfo.AppName != appInfo.AppProfile.EasId { log.Error("AppName in AppInfo does not match EasId in appProfile") errHandlerProblemDetails(w, "AppName and EasId must be consistent", http.StatusBadRequest) return } // Additional consistency checks for fields like scheds, svcArea, etc., based on appProfile attributes } Loading Loading @@ -870,6 +881,34 @@ func appRegistrationPUT(w http.ResponseWriter, r *http.Request) { errHandlerProblemDetails(w, "Shall be present when IsInsByMec is FALSE.", http.StatusBadRequest) return } // Process appProfile if present if appInfoPut.AppProfile != nil { // Validate appProvider, endpoint, and other fields as per mapping to EASProfile if appInfoPut.AppProvider != appInfoPut.AppProfile.ProvId { log.Error("appProvider in AppInfo does not match provId in appProfile") errHandlerProblemDetails(w, "appProvider and provId must be consistent", http.StatusBadRequest) return } if appInfoPut.AppProfile != nil { if !reflect.DeepEqual(getEndpointUris(appInfoPut.Endpoint), getProfileEndpointUris(appInfoPut.AppProfile.EndPt)) { log.Error("endpoint in AppInfo does not match endPt in appProfile") errHandlerProblemDetails(w, "Endpoint and endPt must be consistent", http.StatusBadRequest) return } } if appInfoPut.AppProfile.EasId == "" { log.Error("Mandatory easId parameter should be present") errHandlerProblemDetails(w, "Mandatory attribute easId is missing in the request body.", http.StatusBadRequest) return } if appInfoPut.AppName != appInfoPut.AppProfile.EasId { log.Error("AppName in AppInfo does not match EasId in appProfile") errHandlerProblemDetails(w, "AppName and EasId must be consistent", http.StatusBadRequest) return } // Additional consistency checks for fields like scheds, svcArea, etc., based on appProfile attributes } appInfoPut.AppInstanceId = appInstanceId Loading Loading
go-apps/meep-app-enablement/server/app-support/app-support.go +39 −0 Original line number Diff line number Diff line Loading @@ -704,6 +704,17 @@ func appRegistrationPOST(w http.ResponseWriter, r *http.Request) { } } if appInfo.AppProfile.EasId == "" { log.Error("Mandatory easId parameter should be present") errHandlerProblemDetails(w, "Mandatory attribute easId is missing in the request body.", http.StatusBadRequest) return } if appInfo.AppName != appInfo.AppProfile.EasId { log.Error("AppName in AppInfo does not match EasId in appProfile") errHandlerProblemDetails(w, "AppName and EasId must be consistent", http.StatusBadRequest) return } // Additional consistency checks for fields like scheds, svcArea, etc., based on appProfile attributes } Loading Loading @@ -870,6 +881,34 @@ func appRegistrationPUT(w http.ResponseWriter, r *http.Request) { errHandlerProblemDetails(w, "Shall be present when IsInsByMec is FALSE.", http.StatusBadRequest) return } // Process appProfile if present if appInfoPut.AppProfile != nil { // Validate appProvider, endpoint, and other fields as per mapping to EASProfile if appInfoPut.AppProvider != appInfoPut.AppProfile.ProvId { log.Error("appProvider in AppInfo does not match provId in appProfile") errHandlerProblemDetails(w, "appProvider and provId must be consistent", http.StatusBadRequest) return } if appInfoPut.AppProfile != nil { if !reflect.DeepEqual(getEndpointUris(appInfoPut.Endpoint), getProfileEndpointUris(appInfoPut.AppProfile.EndPt)) { log.Error("endpoint in AppInfo does not match endPt in appProfile") errHandlerProblemDetails(w, "Endpoint and endPt must be consistent", http.StatusBadRequest) return } } if appInfoPut.AppProfile.EasId == "" { log.Error("Mandatory easId parameter should be present") errHandlerProblemDetails(w, "Mandatory attribute easId is missing in the request body.", http.StatusBadRequest) return } if appInfoPut.AppName != appInfoPut.AppProfile.EasId { log.Error("AppName in AppInfo does not match EasId in appProfile") errHandlerProblemDetails(w, "AppName and EasId must be consistent", http.StatusBadRequest) return } // Additional consistency checks for fields like scheds, svcArea, etc., based on appProfile attributes } appInfoPut.AppInstanceId = appInstanceId Loading