beego swagger

为什么自定义的model显示不出来?

// @Title update
// @Description update the user
// @Param    uid    path string    true    "The uid you want to update"
// @Param    body body models.User true    "body for user content"
// @Success 200 {object} models.User
// @Failure 403 :uid is not int
// @router /:uid [put]

我尝试了一下,@Success 200 {object} models.User这个model api里会生效,如果去掉这个,@Param body body models.User trueparam里的model api不会显示出来
clipboard.png

clipboard.png

阅读 2.7k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进