summaryrefslogtreecommitdiffstats
path: root/lib/puppet/network/http/api
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/network/http/api')
-rw-r--r--lib/puppet/network/http/api/v1.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/puppet/network/http/api/v1.rb b/lib/puppet/network/http/api/v1.rb
index 8aa1f0ee1..9e51aae36 100644
--- a/lib/puppet/network/http/api/v1.rb
+++ b/lib/puppet/network/http/api/v1.rb
@@ -60,13 +60,12 @@ module Puppet::Network::HTTP::API::V1
# fix to not need this, and our goal is to move away from the complication
# that leads to the fix being too long.
return :singular if indirection == "facts"
-
- # "status" really is singular
return :singular if indirection == "status"
+ return :plural if indirection == "inventory"
- result = (indirection =~ /s$/) ? :plural : :singular
+ result = (indirection =~ /s$|_search$/) ? :plural : :singular
- indirection.sub!(/s$/, '') if result
+ indirection.sub!(/s$|_search$|es$/, '')
result
end