fix apiresult

Signed-off-by: shaowenchen <mail@chenshaowen.com>
This commit is contained in:
shaowenchen
2020-06-11 18:21:34 +08:00
parent 79e3597173
commit 8a11cbc875
2 changed files with 13 additions and 4 deletions

View File

@@ -60,7 +60,7 @@ func AddToContainer(container *restful.Container, devopsClient devopsClient.Inte
DataFormat("limit=%d,page=%d").
DefaultValue("limit=10,page=1")).
Doc("list the credentials of the specified devops for the current user").
Returns(http.StatusOK, api.StatusOK, api.ListResult{}).
Returns(http.StatusOK, api.StatusOK, api.ListResult{Items: []interface{}{}}).
Metadata(restfulspec.KeyOpenAPITags, []string{constants.DevOpsProjectTag}))
ws.Route(ws.POST("/devops/{devops}/credentials").
@@ -105,7 +105,7 @@ func AddToContainer(container *restful.Container, devopsClient devopsClient.Inte
DataFormat("limit=%d,page=%d").
DefaultValue("limit=10,page=1")).
Doc("list the pipelines of the specified devops for the current user").
Returns(http.StatusOK, api.StatusOK, api.ListResult{}).
Returns(http.StatusOK, api.StatusOK, api.ListResult{Items: []interface{}{}}).
Metadata(restfulspec.KeyOpenAPITags, []string{constants.DevOpsProjectTag}))
ws.Route(ws.POST("/devops/{devops}/pipelines").
@@ -147,7 +147,7 @@ func AddToContainer(container *restful.Container, devopsClient devopsClient.Inte
Required(false).
DataFormat("limit=%d,page=%d").
DefaultValue("limit=10,page=1")).Doc("List the devopsproject of the specified workspace for the current user").
Returns(http.StatusOK, api.StatusOK, api.ListResult{}).
Returns(http.StatusOK, api.StatusOK, api.ListResult{Items: []interface{}{}}).
Metadata(restfulspec.KeyOpenAPITags, []string{constants.DevOpsProjectTag}))
ws.Route(ws.POST("/workspaces/{workspace}/devops").