Merge pull request #14 from elvinchan/13

#13 Fix bug of tag format in doc
This commit is contained in:
陈文强 2018-11-02 23:15:12 +08:00 committed by GitHub
commit 6a29fa9277
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)
``` ```
- 添加响应。 - 添加响应。