* 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
* Avoid calling _httpResponse.Content.ReadAsStringAsync() and deserialize from the content stream
Made a change to avoid calling _httpResponse.Content.ReadAsStringAsync() and deserialize from the content stream, which significantly reduced memory utilization.
Created Kubernetes.cs file and moved constructors and couple methods from the Kubernetes.cs.template to the Kubernetes.cs
Generated Kubernetes.cs will be in a separate commit.
* Separate commit for generated Kubernetes.cs
* port autorest to watch generator
* rename KubernetesWatchGenerator -> KubernetesGenerator
* add validate
* fix format
* fix generate code warnings
* fix line ending
* fix missing property found by comp check
* do not new http method