From 23c70d2142c9958d5c9ed7b8cf11e66fc95eebb1 Mon Sep 17 00:00:00 2001 From: Vittorio Curcio Date: Wed, 12 Dec 2018 23:03:28 +0100 Subject: [PATCH] Really do not add trailing / --- default_api.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/default_api.go b/default_api.go index ffe00cb..03dc84a 100644 --- a/default_api.go +++ b/default_api.go @@ -3868,7 +3868,9 @@ func (a *DefaultApiService) getContentWithPath(projectKey string, repositorySlug localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/browse{path}" localVarPath = strings.Replace(localVarPath, "{"+"projectKey"+"}", fmt.Sprintf("%v", projectKey), -1) localVarPath = strings.Replace(localVarPath, "{"+"repositorySlug"+"}", fmt.Sprintf("%v", repositorySlug), -1) - localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", fmt.Sprintf("/%v", path), -1) + if path != "" { + localVarPath = localVarPath + "/" + path + } localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{}