(#116): Remove mandatory parameter checking for namespace in /lookup #117
(#116): Remove mandatory parameter checking for namespace in /lookup #117
Conversation
lib/jerakia/server/rest.rb
Outdated
| } | ||
|
|
||
| if params['namespace'] | ||
| request_opts[:namespace] = params['namespace'].split(/\//), |
There was a problem hiding this comment.
Unless I'm mistaken, the , at the end is a syntax error?
There was a problem hiding this comment.
Doh! Must add basic syntax to the rake task for testing!
|
@crayfishx What would be an example of doing a namespace-less lookup using the test fixtures? |
|
@jtopjian I'll add an example on this PR, when I fix the syntax error :) |
|
@jtopjian The file resource will simply operate one level up when there is no namespace defined.... so |
|
Those new fixtures are useful 👍 |
|
@crayfishx Awesome - thank you :) I've made the appropriate changes here: jerakia/go-jerakia#1. Once this PR is merged, I'll merge into the go library. |
|
I think we can push this out as a patch release - the expected behaviour was that namespace is optional so the mandatory check not being removed was an oversight... i'll roll this into a 2.5.1 release so it's compatible with the library you're writing. |
As discussed in #116 - namespace has been made optional in other areas (CLI...etc) so the API should not enforce this parameter.
This removes the mandatory parameter check for the namespace parameter in API calls to /lookup/