* Add swagger comment for MirrorSync * Generate swagger.v1.jsontags/v1.2.0-rc1
@@ -228,6 +228,22 @@ | |||
} | |||
} | |||
}, | |||
"/repos/{username}/{reponame}/mirror-sync": { | |||
"post": { | |||
"produces": [ | |||
"application/json" | |||
], | |||
"operationId": "repoMirrorSync", | |||
"responses": { | |||
"200": { | |||
"$ref": "#/responses/empty" | |||
}, | |||
"403": { | |||
"$ref": "#/responses/forbidden" | |||
} | |||
} | |||
} | |||
}, | |||
"/repos/{username}/{reponame}/subscription": { | |||
"get": { | |||
"operationId": "userCurrentCheckSubscription", |
@@ -337,6 +337,15 @@ func Delete(ctx *context.APIContext) { | |||
// MirrorSync adds a mirrored repository to the sync queue | |||
func MirrorSync(ctx *context.APIContext) { | |||
// swagger:route POST /repos/{username}/{reponame}/mirror-sync repoMirrorSync | |||
// | |||
// Produces: | |||
// - application/json | |||
// | |||
// Responses: | |||
// 200: empty | |||
// 403: forbidden | |||
repo := ctx.Repo.Repository | |||
if !ctx.Repo.IsWriter() { |