Merge pull request #425 from soulseen/master

update api description
This commit is contained in:
Zhuxiaoyang
2019-05-14 20:30:30 +08:00
committed by GitHub
2 changed files with 7 additions and 2 deletions

View File

@@ -633,7 +633,7 @@ func addWebService(c *restful.Container) error {
Consumes("application/x-www-form-urlencoded", "charset=utf-8").
Produces("application/json", "charset=utf-8").
Doc("Check pipeline script compile.").
Reads("value=\"\"").
Reads(devops.ReqScript{}).
Returns(http.StatusOK, RespOK, devops.CheckScript{}).
Writes(devops.CheckScript{}))
@@ -642,7 +642,7 @@ func addWebService(c *restful.Container) error {
To(devopsapi.CheckCron).
Metadata(restfulspec.KeyOpenAPITags, tags).
Produces("application/json", "charset=utf-8").
Doc("Check pipeline script compile.").
Doc("Check cron script compile.").
Param(webservice.QueryParameter("value", "cpec value").
Required(true).
DataFormat("value=%s")).

View File

@@ -1013,6 +1013,11 @@ type NodeSteps struct {
Type string `json:"type,omitempty"`
}
// CheckScriptCompile
type ReqScript struct {
Value string `json:"value,omitempty"`
}
// ToJenkinsfile requests
type ReqJson struct {
Json string `json:"json,omitempty"`