Default values in structure
Default values in structure

Swagger default value for golang stucture.

format: 
doc:"default(my_defaul_value)"

type MyStruct struct {
	Template string `json:"template" doc:"default(<h1>Hello, {{ name }}! </h1>)"`
	Name string `json:"name"`
	MyNumber int64 `json:"temp"  doc:"default(10)"`
	MyBool bool `json:"bl"  doc:"default(true)"`
	MyFloat float64 `json:"fl"  doc:"default(12.1234)"`
}
tguangch/bee,franzwilhelm/bee,qida/bee,BorisBorshevsky/bee,ogero/bee,qida/bee,amrfaissal/bee,beego/bee,beego/bee