-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(#116): Remove mandatory parameter checking for namespace in /lookup #117
base: master
Are you sure you want to change the base?
Conversation
lib/jerakia/server/rest.rb
Outdated
} | ||
|
||
if params['namespace'] | ||
request_opts[:namespace] = params['namespace'].split(/\//), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless I'm mistaken, the ,
at the end is a syntax error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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/