update api description

Signed-off-by: soulseen <sunzhu@yunify.com>
This commit is contained in:
soulseen
2019-05-14 17:16:10 +08:00
parent 86c7cf6185
commit ff45220411
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"`