From: ychacon Date: Wed, 24 May 2023 08:51:41 +0000 (+0200) Subject: Fix generate apiId when registering a new service X-Git-Tag: 1.1.0~7 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=bf6fd321b8147d60a902275e11b41414c35b8514;p=nonrtric%2Fplt%2Fsme.git Fix generate apiId when registering a new service Issue-ID: NONRTRIC-861 Signed-off-by: ychacon Change-Id: I917e0a726b003892b2e04bc2216a92ecefbeadd9 --- diff --git a/capifcore/internal/publishserviceapi/typeupdate.go b/capifcore/internal/publishserviceapi/typeupdate.go index 98e059c..4af86ef 100644 --- a/capifcore/internal/publishserviceapi/typeupdate.go +++ b/capifcore/internal/publishserviceapi/typeupdate.go @@ -20,7 +20,9 @@ package publishserviceapi +import "strings" + func (sd *ServiceAPIDescription) PrepareNewService() { - apiName := "api_id_" + sd.ApiName + apiName := "api_id_" + strings.ReplaceAll(sd.ApiName, " ", "_") sd.ApiId = &apiName }