From aefc5120de73b02b530fdb04c3502a549662ed0f Mon Sep 17 00:00:00 2001 From: Sanket Patel <sanketpatel.301090@gmail.com> Date: Tue, 5 Jun 2018 15:22:39 -0500 Subject: [PATCH] Fix CreateWebhook client method --- default_api.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/default_api.go b/default_api.go index ca4faba..517708a 100644 --- a/default_api.go +++ b/default_api.go @@ -1234,24 +1234,22 @@ func (a *DefaultApiService) CreateUser(localVarOptionals map[string]interface{}) Create a webhook for the repository specified via the URL. <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository to call this resource. * @param ctx context.Context for authentication, logging, tracing, etc. @return */ -func (a *DefaultApiService) CreateWebhook(ctx context.Context) (*APIResponse, error) { +func (a *DefaultApiService) CreateWebhook(projectKey, repositorySlug string, localVarPostBody interface{}, localVarHTTPContentTypes []string) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Post") - localVarPostBody interface{} localVarFileName string localVarFileBytes []byte ) // create path and map variables localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/webhooks" + localVarPath = strings.Replace(localVarPath, "{"+"projectKey"+"}", fmt.Sprintf("%v", projectKey), -1) + localVarPath = strings.Replace(localVarPath, "{"+"repositorySlug"+"}", fmt.Sprintf("%v", repositorySlug), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) if localVarHTTPContentType != "" {