forked from forgejo/forgejo
Improve swagger doc (#2274)
* Add swagger comment for adminCreateOrg * Add swagger comment for admin route * add hook swagger doc * Add tags * Add auth * Fix name of responses * Edit name method * Update vendor * make generate-swagger
This commit is contained in:
parent
951c909a67
commit
fd8e8a421a
32 changed files with 1911 additions and 110 deletions
|
@ -14,8 +14,21 @@ import (
|
|||
)
|
||||
|
||||
// CreateOrg api for create organization
|
||||
// see https://github.com/gogits/go-gogs-client/wiki/Administration-Organizations#create-a-new-organization
|
||||
func CreateOrg(ctx *context.APIContext, form api.CreateOrgOption) {
|
||||
// swagger:route POST /admin/users/{username}/orgs admin adminCreateOrg
|
||||
//
|
||||
// Consumes:
|
||||
// - application/json
|
||||
//
|
||||
// Produces:
|
||||
// - application/json
|
||||
//
|
||||
// Responses:
|
||||
// 201: Organization
|
||||
// 403: forbidden
|
||||
// 422: validationError
|
||||
// 500: error
|
||||
|
||||
u := user.GetUserByParams(ctx)
|
||||
if ctx.Written() {
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue