#13 Fix bug of tag format in doc
This commit is contained in:
parent
41e3ba6bb9
commit
3b3067d390
@ -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.
|
||||||
|
@ -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)
|
||||||
```
|
```
|
||||||
- 添加响应。
|
- 添加响应。
|
||||||
|
Loading…
Reference in New Issue
Block a user