diff --git a/app/api/openapi/webhook.go b/app/api/openapi/webhook.go index 66385eb42..77eab9a5d 100644 --- a/app/api/openapi/webhook.go +++ b/app/api/openapi/webhook.go @@ -199,12 +199,13 @@ func webhookOperations(reflector *openapi3.Reflector) { retriggerWebhookExecution := openapi3.Operation{} retriggerWebhookExecution.WithTags("webhook") retriggerWebhookExecution.WithMapOfAnything(map[string]interface{}{"operationId": "retriggerWebhookExecution"}) - _ = reflector.SetRequest(&retriggerWebhookExecution, nil, http.MethodPost) + _ = reflector.SetRequest(&retriggerWebhookExecution, new(webhookExecutionRequest), http.MethodPost) _ = reflector.SetJSONResponse(&retriggerWebhookExecution, new(types.WebhookExecution), http.StatusOK) _ = reflector.SetJSONResponse(&retriggerWebhookExecution, new(usererror.Error), http.StatusBadRequest) _ = reflector.SetJSONResponse(&retriggerWebhookExecution, new(usererror.Error), http.StatusInternalServerError) _ = reflector.SetJSONResponse(&retriggerWebhookExecution, new(usererror.Error), http.StatusUnauthorized) _ = reflector.SetJSONResponse(&retriggerWebhookExecution, new(usererror.Error), http.StatusForbidden) - _ = reflector.Spec.AddOperation(http.MethodGet, - "/repos/{repo_ref}/webhooks/{webhook_identifier}/executions/{webhook_execution_id}", retriggerWebhookExecution) + _ = reflector.Spec.AddOperation(http.MethodPost, + "/repos/{repo_ref}/webhooks/{webhook_identifier}/executions/{webhook_execution_id}/retrigger", + retriggerWebhookExecution) }