Merge branch 'mg/pr-review/fix-list-reviews-swagger' of _OKE5H2PQKOUfzFFDuD4FA/default/CODE/gitness (#75)

This commit is contained in:
Marko Gacesa 2023-05-17 11:54:29 +00:00 committed by Harness
commit f0ef8d7ef3

View File

@ -384,7 +384,7 @@ func pullReqOperations(reflector *openapi3.Reflector) {
reviewerAdd.WithTags("pullreq")
reviewerAdd.WithMapOfAnything(map[string]interface{}{"operationId": "reviewerAddPullReq"})
_ = reflector.SetRequest(&reviewerAdd, new(reviewerAddPullReqRequest), http.MethodPut)
_ = reflector.SetJSONResponse(&reviewerAdd, nil, http.StatusNoContent)
_ = reflector.SetJSONResponse(&reviewerAdd, new(types.PullReqReviewer), http.StatusOK)
_ = reflector.SetJSONResponse(&reviewerAdd, new(usererror.Error), http.StatusBadRequest)
_ = reflector.SetJSONResponse(&reviewerAdd, new(usererror.Error), http.StatusInternalServerError)
_ = reflector.SetJSONResponse(&reviewerAdd, new(usererror.Error), http.StatusUnauthorized)
@ -396,7 +396,7 @@ func pullReqOperations(reflector *openapi3.Reflector) {
reviewerList.WithTags("pullreq")
reviewerList.WithMapOfAnything(map[string]interface{}{"operationId": "reviewerListPullReq"})
_ = reflector.SetRequest(&reviewerList, new(reviewerListPullReqRequest), http.MethodGet)
_ = reflector.SetJSONResponse(&reviewerList, nil, http.StatusNoContent)
_ = reflector.SetJSONResponse(&reviewerList, new([]*types.PullReqReviewer), http.StatusOK)
_ = reflector.SetJSONResponse(&reviewerList, new(usererror.Error), http.StatusBadRequest)
_ = reflector.SetJSONResponse(&reviewerList, new(usererror.Error), http.StatusInternalServerError)
_ = reflector.SetJSONResponse(&reviewerList, new(usererror.Error), http.StatusUnauthorized)