feat: [CODE-2370]: updated errors for restore/delete PR source branch API in swagger (#2714)

* fixed op name
* feat: [CODE-2370]: updated errors for restore/delete PR source branch API in swagger
CODE-2402
Karan Saraswat 2024-09-20 09:32:48 +00:00 committed by Harness
parent 8bc9714c92
commit cea79227c2
1 changed files with 2 additions and 0 deletions

View File

@ -714,6 +714,7 @@ func pullReqOperations(reflector *openapi3.Reflector) {
_ = reflector.SetJSONResponse(&opRestoreBranch, new(usererror.Error), http.StatusInternalServerError)
_ = reflector.SetJSONResponse(&opRestoreBranch, new(usererror.Error), http.StatusUnauthorized)
_ = reflector.SetJSONResponse(&opRestoreBranch, new(usererror.Error), http.StatusForbidden)
_ = reflector.SetJSONResponse(&opRestoreBranch, new(usererror.Error), http.StatusConflict)
_ = reflector.SetJSONResponse(&opRestoreBranch, new(types.RulesViolations), http.StatusUnprocessableEntity)
_ = reflector.Spec.AddOperation(http.MethodPost, "/repos/{repo_ref}/pullreq/{pullreq_number}/branch", opRestoreBranch)
@ -727,6 +728,7 @@ func pullReqOperations(reflector *openapi3.Reflector) {
_ = reflector.SetJSONResponse(&opDeleteBranch, new(usererror.Error), http.StatusUnauthorized)
_ = reflector.SetJSONResponse(&opDeleteBranch, new(usererror.Error), http.StatusForbidden)
_ = reflector.SetJSONResponse(&opDeleteBranch, new(usererror.Error), http.StatusNotFound)
_ = reflector.SetJSONResponse(&opDeleteBranch, new(usererror.Error), http.StatusConflict)
_ = reflector.SetJSONResponse(&opDeleteBranch, new(types.RulesViolations), http.StatusUnprocessableEntity)
_ = reflector.Spec.AddOperation(http.MethodDelete, "/repos/{repo_ref}/pullreq/{pullreq_number}/branch", opDeleteBranch)