You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixed bug in methods which hit "apis/{group}/..." url (#741)
* Moved _url.Replace("/apis//", "/api/") down several lines.
Consider the following code:
var _baseUrl = BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/{group}/{version}/namespaces/{namespace}/{plural}").ToString();
_url = _url.Replace("/apis//", "/api/");
_url = _url.Replace("{group}", group);
_url = _url.Replace("{version}", version);
_url = _url.Replace("{namespace}", namespaceParameter);
_url = _url.Replace("{plural}", plural);
If group is empty string, we need to replace /apis// with /api.
To do this, we need to replace /apis// after {group}.
Code after the change:
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/{group}/{version}/namespaces/{namespace}/{plural}").ToString();
_url = _url.Replace("{group}", group);
_url = _url.Replace("{version}", version);
_url = _url.Replace("{namespace}", namespaceParameter);
_url = _url.Replace("{plural}", plural);
_url = _url.Replace("/apis//", "/api/");
* Auto-generated changes
0 commit comments