diff --git a/default_api.go b/default_api.go index cd6f810..6ce63ff 100644 --- a/default_api.go +++ b/default_api.go @@ -3848,7 +3848,15 @@ func (a *DefaultApiService) GetCommits_8(pullRequestID int64, localVarOptionals @param "blame" (string) if present the blame will be returned for the file as well. @param "noContent" (string) if present and used with blame only the blame is retrieved instead of the contents. @return */ -func (a *DefaultApiService) GetContent(localVarOptionals map[string]interface{}) (*APIResponse, error) { +func (a *DefaultApiService) GetContent(projectKey string, repositorySlug string, localVarOptionals map[string]interface{}) (*APIResponse, error) { + return a.getContentWithPath(projectKey, repositorySlug, "", localVarOptionals) +} + +func (a *DefaultApiService) GetContent_0(projectKey string, repositorySlug string, path string, localVarOptionals map[string]interface{}) (*APIResponse, error) { + return a.getContentWithPath(projectKey, repositorySlug, path, localVarOptionals) +} + +func (a *DefaultApiService) getContentWithPath(projectKey string, repositorySlug string, path string, localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") localVarPostBody interface{} @@ -3858,6 +3866,11 @@ func (a *DefaultApiService) GetContent(localVarOptionals map[string]interface{}) // create path and map variables localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/browse" + localVarPath = strings.Replace(localVarPath, "{"+"projectKey"+"}", fmt.Sprintf("%v", projectKey), -1) + localVarPath = strings.Replace(localVarPath, "{"+"repositorySlug"+"}", fmt.Sprintf("%v", repositorySlug), -1) + if path != "" { + localVarPath = localVarPath + "/" + path + } localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} diff --git a/default_api_test.go b/default_api_test.go index 1da056d..3d3a199 100644 --- a/default_api_test.go +++ b/default_api_test.go @@ -2099,6 +2099,8 @@ func TestDefaultApiService_GetContent(t *testing.T) { client *APIClient } type args struct { + projectKey string + repositorySlug string localVarOptionals map[string]interface{} } tests := []struct { @@ -2115,7 +2117,7 @@ func TestDefaultApiService_GetContent(t *testing.T) { a := &DefaultApiService{ client: tt.fields.client, } - got, err := a.GetContent(tt.args.localVarOptionals) + got, err := a.GetContent(tt.args.projectKey, tt.args.repositorySlug, tt.args.localVarOptionals) if (err != nil) != tt.wantErr { t.Errorf("DefaultApiService.GetContent() error = %v, wantErr %v", err, tt.wantErr) return