Skip to content

Commit 59c8ada

Browse files
committed
Fix Swagger
1 parent b474de6 commit 59c8ada

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

routers/api/v1/org/avatar.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ func UpdateAvatar(ctx *context.APIContext) {
2424
// - name: org
2525
// in: path
2626
// description: name of the organization
27+
// type: string
28+
// required: true
2729
// - name: body
2830
// in: body
2931
// schema:
@@ -58,6 +60,8 @@ func DeleteAvatar(ctx *context.APIContext) {
5860
// - name: org
5961
// in: path
6062
// description: name of the organization
63+
// type: string
64+
// required: true
6165
// responses:
6266
// "204":
6367
// "$ref": "#/responses/empty"

templates/swagger/v1_json.tmpl

Lines changed: 6 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/integration/api_repo_avatar_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func TestAPIUpdateRepoAvatar(t *testing.T) {
4141
req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/avatar?token=%s", repo.OwnerName, repo.Name, token), &opts)
4242
MakeRequest(t, req, http.StatusNoContent)
4343

44-
// Test what happens if you donÄt have a valid Base64 string
44+
// Test what happens if you don't have a valid Base64 string
4545
opts = api.UpdateRepoAvatarOption{
4646
Image: "Invalid",
4747
}

0 commit comments

Comments
 (0)