Closed codymwalker closed 9 years ago
I missed this in the original PR (I know I commented on the nls of the status message, I just didn't catch on to why you were doing it) - it appears you're sending a status message to the http node from the swagger node? The status message is being given to the http node to translate, so it uses the http node's namespace.
You will need to provide the fully qualified message identifier including its namespace:
node-red-node-swagger:swagger.status.missingconfig
should do it.
Ah, excellent. Will test this out this afternoon. On Aug 13, 2015 11:22 AM, "knolleary" notifications@github.com wrote:
I missed this in the original PR (I know I commented on the nls of the status message, I just didn't catch on to why you were doing it) - it appears you're sending a status message to the http node from the swagger node? The status message is being given to the http node to translate, so it uses the http node's namespace.
You will need to provide the fully qualified message identifier including its namespace:
node-red-node-swagger:swagger.status.missingconfig
should do it.
— Reply to this email directly or view it on GitHub https://github.com/node-red/node-red-node-swagger/issues/25#issuecomment-130749533 .
Hmm, even when passing the identifier including namespace, it does not load the message from the locale.
I tested this elsewhere, in the Google nodes, and even when passing in its own namespace, it does not find the message.
plus.status.failed
should equal node-red-node-google:plus.status.failed
Ah - double checked the code, and support for cross-namespace nls of status messages didn't get implemented as we had no need for it.
This will require a change in node-red (and a new release for you guys to pick up). What's the intent of the swagger node provided status messages to the http node?
Actually, I take that back... it is there.
I got the namespace wrong. Try:
node-red-node-swagger/swagger:swagger.status.missingconfig
Perfect! That does work
Phew :+1:
Here's the use cases btw:
If a user has the swagger plugin installed, they get additional statuses on their http-in nodes to help determine if they're included in swagger generation.
If an http-in node does not have an http-out node attached, we alert them that it is excluded from swagger gen.
If an http-in node does have an http-out node attached, but does not have a user defined swagger doc config set, we alert them, so they know they are getting they 'default swagger' in swagger gen.
We go across namespace and set it from the swagger plugin so these messages are only appearing to the relevant user base -- those with the swagger plugin installed.
Instead of pulling the value from the locale document, the swagger status is showing "swagger.status.missingconfig".
I believe the swagger locale namespace is not being picked up before the editor is being loaded. This timing issue is causing the swagger statuses to be unknown to the editor.