diff --git a/modules/auth/repo_form.go b/modules/auth/repo_form.go
index 3f5078171..58be0ec3a 100644
--- a/modules/auth/repo_form.go
+++ b/modules/auth/repo_form.go
@@ -367,7 +367,7 @@ func (f *InitializeLabelsForm) Validate(ctx *macaron.Context, errs binding.Error
 // swagger:model MergePullRequestOption
 type MergePullRequestForm struct {
 	// required: true
-	// enum: merge, rebase, rebase-merge, squash
+	// enum: merge,rebase,rebase-merge,squash
 	Do                string `binding:"Required;In(merge,rebase,rebase-merge,squash)"`
 	MergeTitleField   string
 	MergeMessageField string
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl
index d77c5b708..a24bf3838 100644
--- a/templates/swagger/v1_json.tmpl
+++ b/templates/swagger/v1_json.tmpl
@@ -7718,9 +7718,9 @@
           "type": "string",
           "enum": [
             "merge",
-            " rebase",
-            " rebase-merge",
-            " squash"
+            "rebase",
+            "rebase-merge",
+            "squash"
           ]
         },
         "MergeMessageField": {