Skip to content

Commit f26f4a7

Browse files
ethantkoeniglafriks
authored andcommitted
Update swagger documentation (#2899)
* Update swagger documentation Add docs for missing endpoints Add documentation for request parameters Make parameter naming consistent Fix response documentation * Restore delete comments
1 parent 4287d10 commit f26f4a7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+9061
-2509
lines changed

Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,6 @@ generate-swagger:
8989
$(GO) get -u github.com/go-swagger/go-swagger/cmd/swagger; \
9090
fi
9191
swagger generate spec -o ./public/swagger.v1.json
92-
$(SED_INPLACE) "s;\".ref\": \"#/definitions/GPGKey\";\"type\": \"object\";g" ./public/swagger.v1.json
93-
$(SED_INPLACE) "s;^ \".ref\": \"#/definitions/Repository\"; \"type\": \"object\";g" ./public/swagger.v1.json
9492

9593
.PHONY: errcheck
9694
errcheck:

modules/auth/repo_form.go

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,17 @@ func (f *CreateRepoForm) Validate(ctx *macaron.Context, errs binding.Errors) bin
4141

4242
// MigrateRepoForm form for migrating repository
4343
type MigrateRepoForm struct {
44+
// required: true
4445
CloneAddr string `json:"clone_addr" binding:"Required"`
4546
AuthUsername string `json:"auth_username"`
4647
AuthPassword string `json:"auth_password"`
47-
UID int64 `json:"uid" binding:"Required"`
48-
RepoName string `json:"repo_name" binding:"Required;AlphaDashDot;MaxSize(100)"`
49-
Mirror bool `json:"mirror"`
50-
Private bool `json:"private"`
51-
Description string `json:"description" binding:"MaxSize(255)"`
48+
// required: true
49+
UID int64 `json:"uid" binding:"Required"`
50+
// required: true
51+
RepoName string `json:"repo_name" binding:"Required;AlphaDashDot;MaxSize(100)"`
52+
Mirror bool `json:"mirror"`
53+
Private bool `json:"private"`
54+
Description string `json:"description" binding:"MaxSize(255)"`
5255
}
5356

5457
// Validate validates the fields

0 commit comments

Comments
 (0)