1
0
Fork 0
forked from forgejo/forgejo

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
This commit is contained in:
Ethan Koenig 2017-11-12 23:02:25 -08:00 committed by Lauris BH
parent 4287d100b3
commit f26f4a7e01
72 changed files with 8875 additions and 2323 deletions

View file

@ -10,8 +10,7 @@ import (
"fmt"
)
// Organization a group of some repositories, users and teams
// swagger:response Organization
// Organization represents an organization
type Organization struct {
ID int64 `json:"id"`
UserName string `json:"username"`
@ -40,22 +39,17 @@ func (c *Client) GetOrg(orgname string) (*Organization, error) {
return org, c.getParsedResponse("GET", fmt.Sprintf("/orgs/%s", orgname), nil, nil, org)
}
// CreateOrgOption create one organization options
// swagger:parameters adminCreateOrg
// CreateOrgOption options for creating an organization
type CreateOrgOption struct {
// in: body
// required: true
UserName string `json:"username" binding:"Required"`
// in: body
FullName string `json:"full_name"`
// in: body
Description string `json:"description"`
// in: body
Website string `json:"website"`
// in: body
Location string `json:"location"`
}
// EditOrgOption edit one organization options
// EditOrgOption options for editing an organization
type EditOrgOption struct {
FullName string `json:"full_name"`
Description string `json:"description"`