#13 Fix bug of tag format in doc

This commit is contained in:
ElvinChan 2018-11-02 22:57:38 +08:00
parent 41e3ba6bb9
commit 3b3067d390
2 changed files with 4 additions and 4 deletions

View File

@ -132,14 +132,14 @@ The methods which name's suffix are `Nested` means these methods treat parameter
e.g. e.g.
``` ```
type SearchInput struct { type SearchInput struct {
Q string `query:"q" swagger:"desc("Keywords"),required"` Q string `query:"q" swagger:"desc(Keywords),required"`
SkipCount int `query:"skipCount"` SkipCount int `query:"skipCount"`
} }
a.AddParamQueryNested(SearchInput{}) a.AddParamQueryNested(SearchInput{})
``` ```
Is equivalent to: Is equivalent to:
``` ```
a.AddParamQuery("", "q", "", true). a.AddParamQuery("", "q", "Keywords", true).
AddParamQuery(0, "skipCount", "", false) AddParamQuery(0, "skipCount", "", false)
``` ```
- Add responses. - Add responses.

View File

@ -132,14 +132,14 @@ AddParamFile(name, desc string, required bool)
例: 例:
``` ```
type SearchInput struct { type SearchInput struct {
Q string `query:"q" swagger:"desc("Keywords"),required"` Q string `query:"q" swagger:"desc(Keywords),required"`
SkipCount int `query:"skipCount"` SkipCount int `query:"skipCount"`
} }
a.AddParamQueryNested(SearchInput{}) a.AddParamQueryNested(SearchInput{})
``` ```
等价于: 等价于:
``` ```
a.AddParamQuery("", "q", "", true). a.AddParamQuery("", "q", "Keywords", true).
AddParamQuery(0, "skipCount", "", false) AddParamQuery(0, "skipCount", "", false)
``` ```
- 添加响应。 - 添加响应。