Fix building of wrong YANG notify stream
[netconf.git] / restconf / restconf-nb-rfc8040 / src / main / java / org / opendaylight / restconf / nb / rfc8040 / rests / utils / CreateStreamUtil.java
index e6cab92554540dbb85f6cb1cf65d584b08287b91..a31d0a58113f18ef93611d678b7e968da65343ae 100644 (file)
@@ -231,13 +231,13 @@ public final class CreateStreamUtil {
                 notificationDefinitionQName.getModule().getNamespace()));
 
         final StringBuilder streamNameBuilder = new StringBuilder();
-        streamNameBuilder.append(RestconfStreamsConstants.CREATE_NOTIFICATION_STREAM)
+        streamNameBuilder.append(RestconfStreamsConstants.NOTIFICATION_STREAM)
                 .append('/')
                 .append(module.getName())
                 .append(':')
                 .append(notificationDefinitionQName.getLocalName());
         if (outputType.equals(NotificationOutputType.JSON.getName())) {
-            streamNameBuilder.append(NotificationOutputType.JSON.getName());
+            streamNameBuilder.append('/').append(NotificationOutputType.JSON.getName());
         }
         return streamNameBuilder.toString();
     }