summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/org
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/org')
-rw-r--r--routers/api/v1/org/hook.go12
-rw-r--r--routers/api/v1/org/member.go12
-rw-r--r--routers/api/v1/org/team.go10
3 files changed, 20 insertions, 14 deletions
diff --git a/routers/api/v1/org/hook.go b/routers/api/v1/org/hook.go
index 83d2a5e5ba..84559a958e 100644
--- a/routers/api/v1/org/hook.go
+++ b/routers/api/v1/org/hook.go
@@ -59,6 +59,7 @@ func GetHook(ctx *context.APIContext) {
// in: path
// description: id of the hook to get
// type: integer
+ // format: int64
// required: true
// responses:
// "200":
@@ -87,6 +88,11 @@ func CreateHook(ctx *context.APIContext, form api.CreateHookOption) {
// description: name of the organization
// type: string
// required: true
+ // - name: body
+ // in: body
+ // required: true
+ // schema:
+ // "$ref": "#/definitions/CreateHookOption"
// responses:
// "201":
// "$ref": "#/responses/Hook"
@@ -117,7 +123,12 @@ func EditHook(ctx *context.APIContext, form api.EditHookOption) {
// in: path
// description: id of the hook to update
// type: integer
+ // format: int64
// required: true
+ // - name: body
+ // in: body
+ // schema:
+ // "$ref": "#/definitions/EditHookOption"
// responses:
// "200":
// "$ref": "#/responses/Hook"
@@ -144,6 +155,7 @@ func DeleteHook(ctx *context.APIContext) {
// in: path
// description: id of the hook to delete
// type: integer
+ // format: int64
// required: true
// responses:
// "204":
diff --git a/routers/api/v1/org/member.go b/routers/api/v1/org/member.go
index 65754b88ec..b66d86c660 100644
--- a/routers/api/v1/org/member.go
+++ b/routers/api/v1/org/member.go
@@ -117,12 +117,8 @@ func IsMember(ctx *context.APIContext) {
// responses:
// "204":
// description: user is a member
- // schema:
- // "$ref": "#/responses/empty"
// "404":
// description: user is not a member
- // schema:
- // "$ref": "#/responses/empty"
userToCheck := user.GetUserByParams(ctx)
if ctx.Written() {
return
@@ -172,12 +168,8 @@ func IsPublicMember(ctx *context.APIContext) {
// responses:
// "204":
// description: user is a public member
- // schema:
- // "$ref": "#/responses/empty"
// "404":
// description: user is not a public member
- // schema:
- // "$ref": "#/responses/empty"
userToCheck := user.GetUserByParams(ctx)
if ctx.Written() {
return
@@ -210,8 +202,6 @@ func PublicizeMember(ctx *context.APIContext) {
// responses:
// "204":
// description: membership publicized
- // schema:
- // "$ref": "#/responses/empty"
userToPublicize := user.GetUserByParams(ctx)
if ctx.Written() {
return
@@ -286,8 +276,6 @@ func DeleteMember(ctx *context.APIContext) {
// responses:
// "204":
// description: member removed
- // schema:
- // "$ref": "#/responses/empty"
member := user.GetUserByParams(ctx)
if ctx.Written() {
return
diff --git a/routers/api/v1/org/team.go b/routers/api/v1/org/team.go
index b8dd026bf3..2e319a1831 100644
--- a/routers/api/v1/org/team.go
+++ b/routers/api/v1/org/team.go
@@ -54,6 +54,7 @@ func GetTeam(ctx *context.APIContext) {
// in: path
// description: id of the team to get
// type: integer
+ // format: int64
// required: true
// responses:
// "200":
@@ -144,12 +145,11 @@ func DeleteTeam(ctx *context.APIContext) {
// in: path
// description: id of the team to delete
// type: integer
+ // format: int64
// required: true
// responses:
// "204":
// description: team deleted
- // schema:
- // "$ref": "#/responses/empty"
if err := models.DeleteTeam(ctx.Org.Team); err != nil {
ctx.Error(500, "DeleteTeam", err)
return
@@ -169,6 +169,7 @@ func GetTeamMembers(ctx *context.APIContext) {
// in: path
// description: id of the team
// type: integer
+ // format: int64
// required: true
// responses:
// "200":
@@ -205,6 +206,7 @@ func AddTeamMember(ctx *context.APIContext) {
// in: path
// description: id of the team
// type: integer
+ // format: int64
// required: true
// - name: username
// in: path
@@ -237,6 +239,7 @@ func RemoveTeamMember(ctx *context.APIContext) {
// in: path
// description: id of the team
// type: integer
+ // format: int64
// required: true
// - name: username
// in: path
@@ -270,6 +273,7 @@ func GetTeamRepos(ctx *context.APIContext) {
// in: path
// description: id of the team
// type: integer
+ // format: int64
// required: true
// responses:
// "200":
@@ -316,6 +320,7 @@ func AddTeamRepository(ctx *context.APIContext) {
// in: path
// description: id of the team
// type: integer
+ // format: int64
// required: true
// - name: org
// in: path
@@ -362,6 +367,7 @@ func RemoveTeamRepository(ctx *context.APIContext) {
// in: path
// description: id of the team
// type: integer
+ // format: int64
// required: true
// - name: org
// in: path