From 0a4257549019e4b1e512b17e124ac4a6c614fe49 Mon Sep 17 00:00:00 2001 From: Liu Siyuan Date: Thu, 3 Aug 2017 17:32:46 +0800 Subject: [PATCH] Do no omit response description [swagger specs](https://swagger.io/docs/specification/describing-responses/) requires each response to have a description. Otherwise, ignorable error will be generated. This PR makes sure that description field is not omitted in the event that user did not give a description. --- vendor/github.com/astaxie/beego/swagger/swagger.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/github.com/astaxie/beego/swagger/swagger.go b/vendor/github.com/astaxie/beego/swagger/swagger.go index 035d5a4..89fef8a 100644 --- a/vendor/github.com/astaxie/beego/swagger/swagger.go +++ b/vendor/github.com/astaxie/beego/swagger/swagger.go @@ -141,7 +141,7 @@ type Propertie struct { // Response as they are returned from executing this operation. type Response struct { - Description string `json:"description,omitempty" yaml:"description,omitempty"` + Description string `json:"description" yaml:"description"` Schema *Schema `json:"schema,omitempty" yaml:"schema,omitempty"` Ref string `json:"$ref,omitempty" yaml:"$ref,omitempty"` }