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:
parent
4287d100b3
commit
f26f4a7e01
72 changed files with 8875 additions and 2323 deletions
29
vendor/code.gitea.io/sdk/gitea/admin_user.go
generated
vendored
29
vendor/code.gitea.io/sdk/gitea/admin_user.go
generated
vendored
|
@ -11,21 +11,17 @@ import (
|
|||
)
|
||||
|
||||
// CreateUserOption create user options
|
||||
// swagger:parameters adminCreateUser
|
||||
type CreateUserOption struct {
|
||||
// in: body
|
||||
SourceID int64 `json:"source_id"`
|
||||
// in: body
|
||||
LoginName string `json:"login_name"`
|
||||
// in: body
|
||||
// required: true
|
||||
Username string `json:"username" binding:"Required;AlphaDashDot;MaxSize(35)"`
|
||||
// in: body
|
||||
FullName string `json:"full_name" binding:"MaxSize(100)"`
|
||||
// in: body
|
||||
// required: true
|
||||
// swagger:strfmt email
|
||||
Email string `json:"email" binding:"Required;Email;MaxSize(254)"`
|
||||
// in: body
|
||||
Password string `json:"password" binding:"MaxSize(255)"`
|
||||
// in: body
|
||||
// required: true
|
||||
Password string `json:"password" binding:"Required;MaxSize(255)"`
|
||||
SendNotify bool `json:"send_notify"`
|
||||
}
|
||||
|
||||
|
@ -40,31 +36,20 @@ func (c *Client) AdminCreateUser(opt CreateUserOption) (*User, error) {
|
|||
}
|
||||
|
||||
// EditUserOption edit user options
|
||||
// swagger:parameters adminEditUser
|
||||
type EditUserOption struct {
|
||||
// in: body
|
||||
SourceID int64 `json:"source_id"`
|
||||
// in: body
|
||||
LoginName string `json:"login_name"`
|
||||
// in: body
|
||||
FullName string `json:"full_name" binding:"MaxSize(100)"`
|
||||
// in: body
|
||||
// required: true
|
||||
// swagger:strfmt email
|
||||
Email string `json:"email" binding:"Required;Email;MaxSize(254)"`
|
||||
// in: body
|
||||
Password string `json:"password" binding:"MaxSize(255)"`
|
||||
// in: body
|
||||
Website string `json:"website" binding:"MaxSize(50)"`
|
||||
// in: body
|
||||
Location string `json:"location" binding:"MaxSize(50)"`
|
||||
// in: body
|
||||
Active *bool `json:"active"`
|
||||
// in: body
|
||||
Admin *bool `json:"admin"`
|
||||
// in: body
|
||||
AllowGitHook *bool `json:"allow_git_hook"`
|
||||
// in: body
|
||||
AllowImportLocal *bool `json:"allow_import_local"`
|
||||
// in: body
|
||||
MaxRepoCreation *int `json:"max_repo_creation"`
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue