mirror of
https://github.com/harness/drone.git
synced 2025-05-06 06:29:39 +08:00
fix swagger reviewer API response
This commit is contained in:
parent
158fcaaef6
commit
9f4e45be74
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user