Fix generate apiId when registering a new service
[nonrtric/plt/sme.git] / capifcore / internal / publishserviceapi / typeupdate.go
index 98e059c..4af86ef 100644 (file)
@@ -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
 }