RESTMapper addKnownGroupAndReload fails when calling method's resource has unspecified Version #2345
Labels
kind/bug
Categorizes issue or PR as related to a bug.
kind/regression
Categorizes issue or PR as related to a regression from a prior release.
Problem
When calling
KindFor
,KindsFor
,ResourceFor
, orResourcesFor
without specifyingVersion
inresource schema.GroupVersionResource
, the list of versions forwarded toaddKnownGroupAndReload
is[""]
.addKnownGroupAndReload
does not handle empty resources well, and fails with:Test case
Suggested Solution
Clear the version list in
addKnownGroupAndReload
if""
is the only value:The text was updated successfully, but these errors were encountered: