From bedaf1c8066eaa9cd05d54a9cdedc2107c6b07f9 Mon Sep 17 00:00:00 2001 From: MingZong Date: Thu, 7 Apr 2016 14:17:19 +0800 Subject: [PATCH] Notes Error Correction --- g_controller.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/g_controller.go b/g_controller.go index 9a3f631..bc1c532 100644 --- a/g_controller.go +++ b/g_controller.go @@ -87,8 +87,8 @@ func (c *{{controllerName}}Controller) URLMapping() { // @Title Post // @Description create {{controllerName}} -// @Param body body models.{{controllerName}} true "body for {{controllerName}} content" -// @Success 201 {object} models.{{controllerName}} +// @Param body body structures.{{controllerName}} true "body for {{controllerName}} content" +// @Success 201 {object} structures.{{controllerName}} // @Failure 403 body is empty // @router / [post] func (c *{{controllerName}}Controller) Post() { @@ -98,7 +98,7 @@ func (c *{{controllerName}}Controller) Post() { // @Title Get // @Description get {{controllerName}} by id // @Param id path string true "The key for staticblock" -// @Success 200 {object} models.{{controllerName}} +// @Success 200 {object} structures.{{controllerName}} // @Failure 403 :id is empty // @router /:id [get] func (c *{{controllerName}}Controller) GetOne() { @@ -113,7 +113,7 @@ func (c *{{controllerName}}Controller) GetOne() { // @Param order query string false "Order corresponding to each sortby field, if single value, apply to all sortby fields. e.g. desc,asc ..." // @Param limit query string false "Limit the size of result set. Must be an integer" // @Param offset query string false "Start position of result set. Must be an integer" -// @Success 200 {object} models.{{controllerName}} +// @Success 200 {object} structures.{{controllerName}} // @Failure 403 // @router / [get] func (c *{{controllerName}}Controller) GetAll() { @@ -124,7 +124,7 @@ func (c *{{controllerName}}Controller) GetAll() { // @Description update the {{controllerName}} // @Param id path string true "The id you want to update" // @Param body body models.{{controllerName}} true "body for {{controllerName}} content" -// @Success 200 {object} models.{{controllerName}} +// @Success 200 {object} structures.{{controllerName}} // @Failure 403 :id is not int // @router /:id [put] func (c *{{controllerName}}Controller) Put() { @@ -170,8 +170,8 @@ func (c *{{controllerName}}Controller) URLMapping() { // @Title Post // @Description create {{controllerName}} -// @Param body body models.{{controllerName}} true "body for {{controllerName}} content" -// @Success 201 {int} models.{{controllerName}} +// @Param body body structures.{{controllerName}} true "body for {{controllerName}} content" +// @Success 201 {int} structures.{{controllerName}} // @Failure 403 body is empty // @router / [post] func (c *{{controllerName}}Controller) Post() { @@ -189,7 +189,7 @@ func (c *{{controllerName}}Controller) Post() { // @Title Get // @Description get {{controllerName}} by id // @Param id path string true "The key for staticblock" -// @Success 200 {object} models.{{controllerName}} +// @Success 200 {object} structures.{{controllerName}} // @Failure 403 :id is empty // @router /:id [get] func (c *{{controllerName}}Controller) GetOne() { @@ -212,7 +212,7 @@ func (c *{{controllerName}}Controller) GetOne() { // @Param order query string false "Order corresponding to each sortby field, if single value, apply to all sortby fields. e.g. desc,asc ..." // @Param limit query string false "Limit the size of result set. Must be an integer" // @Param offset query string false "Start position of result set. Must be an integer" -// @Success 200 {object} models.{{controllerName}} +// @Success 200 {object} structures.{{controllerName}} // @Failure 403 // @router / [get] func (c *{{controllerName}}Controller) GetAll() { @@ -270,7 +270,7 @@ func (c *{{controllerName}}Controller) GetAll() { // @Description update the {{controllerName}} // @Param id path string true "The id you want to update" // @Param body body models.{{controllerName}} true "body for {{controllerName}} content" -// @Success 200 {object} models.{{controllerName}} +// @Success 200 {object} structures.{{controllerName}} // @Failure 403 :id is not int // @router /:id [put] func (c *{{controllerName}}Controller) Put() {