beego / bee

Bee is a tool for helping develop with beego app framework.
Apache License 2.0
1.45k stars 922 forks source link

fix required struct tag when anonymous nested struct #778

Closed RedBoneZhang closed 3 years ago

RedBoneZhang commented 3 years ago

when use anonymous nested structures at @param body,required stuct tag is invalid. struct define like follow:

type StructA struct {
   Name string `json:"name" required:"true"`
}

type StructB struct {
  StructA 
}

error: when use StructB in @param,required struct tag is not generated in swagger.json.

RedBoneZhang commented 3 years ago

del.