diff --git a/README.md b/README.md index 75ca2e6..cef4749 100644 --- a/README.md +++ b/README.md @@ -132,14 +132,14 @@ The methods which name's suffix are `Nested` means these methods treat parameter e.g. ``` type SearchInput struct { - Q string `query:"q" swagger:"desc("Keywords"),required"` + Q string `query:"q" swagger:"desc(Keywords),required"` SkipCount int `query:"skipCount"` } a.AddParamQueryNested(SearchInput{}) ``` Is equivalent to: ``` -a.AddParamQuery("", "q", "", true). +a.AddParamQuery("", "q", "Keywords", true). AddParamQuery(0, "skipCount", "", false) ``` - Add responses. diff --git a/README_zh-CN.md b/README_zh-CN.md index 15ff562..4d49317 100644 --- a/README_zh-CN.md +++ b/README_zh-CN.md @@ -132,14 +132,14 @@ AddParamFile(name, desc string, required bool) 例: ``` type SearchInput struct { - Q string `query:"q" swagger:"desc("Keywords"),required"` + Q string `query:"q" swagger:"desc(Keywords),required"` SkipCount int `query:"skipCount"` } a.AddParamQueryNested(SearchInput{}) ``` 等价于: ``` -a.AddParamQuery("", "q", "", true). +a.AddParamQuery("", "q", "Keywords", true). AddParamQuery(0, "skipCount", "", false) ``` - 添加响应。