FullName *string `json:"full_name" binding:"MaxSize(100)"`
Password string `json:"password" binding:"MaxSize(255)"`
MustChangePassword *bool `json:"must_change_password"`
- Website *string `json:"website" binding:"MaxSize(50)"`
+ Website *string `json:"website" binding:"OmitEmpty;ValidUrl;MaxSize(255)"`
Location *string `json:"location" binding:"MaxSize(50)"`
+ Description *string `json:"description" binding:"MaxSize(255)"`
Active *bool `json:"active"`
Admin *bool `json:"admin"`
AllowGitHook *bool `json:"allow_git_hook"`
// required: true
UserName string `json:"username" binding:"Required"`
FullName string `json:"full_name"`
- Description string `json:"description"`
- Website string `json:"website"`
- Location string `json:"location"`
+ Description string `json:"description" binding:"MaxSize(255)"`
+ Website string `json:"website" binding:"ValidUrl;MaxSize(255)"`
+ Location string `json:"location" binding:"MaxSize(50)"`
// possible values are `public` (default), `limited` or `private`
// enum: public,limited,private
Visibility string `json:"visibility" binding:"In(,public,limited,private)"`
// EditOrgOption options for editing an organization
type EditOrgOption struct {
FullName string `json:"full_name"`
- Description string `json:"description"`
- Website string `json:"website"`
- Location string `json:"location"`
+ Description string `json:"description" binding:"MaxSize(255)"`
+ Website string `json:"website" binding:"ValidUrl;MaxSize(255)"`
+ Location string `json:"location" binding:"MaxSize(50)"`
// possible values are `public`, `limited` or `private`
// enum: public,limited,private
Visibility string `json:"visibility" binding:"In(,public,limited,private)"`
Location string `json:"location"`
// the user's website
Website string `json:"website"`
- // the user's biography
- Description string `json:"bio"`
+ // the user's description
+ Description string `json:"description"`
}
// MarshalJSON implements the json.Marshaler interface for User, adding field(s) for backward compatibility
"type": "boolean",
"x-go-name": "AllowImportLocal"
},
+ "description": {
+ "type": "string",
+ "x-go-name": "Description"
+ },
"email": {
"type": "string",
"format": "email",
"type": "string",
"x-go-name": "AvatarURL"
},
- "bio": {
- "description": "the user's biography",
- "type": "string",
- "x-go-name": "Description"
- },
"created": {
"type": "string",
"format": "date-time",
"x-go-name": "Created"
},
+ "description": {
+ "description": "the user's description",
+ "type": "string",
+ "x-go-name": "Description"
+ },
"email": {
"type": "string",
"format": "email",