Skip to content
This repository was archived by the owner on Dec 23, 2025. It is now read-only.

Commit a825bed

Browse files
committed
docs(binding): Update README
Change-Id: Ifd78db26b7a1d74232748ca13a2811da01b8d188
1 parent 4bcdbb3 commit a825bed

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

binding/README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,33 @@ func Example() {
8585
}
8686
...
8787
```
88+
89+
## Position
90+
91+
The parameter position in HTTP request:
92+
93+
|expression|description|
94+
|---------------|-----------|
95+
|`{path:'$name'}`|URL path parameter
96+
|`{query:'$name'}`|URL query parameter
97+
|`{body:'$name'}`|The field in body, support:<br>`application/json`,<br>`application/x-www-form-urlencoded`,<br>`multipart/form-data`
98+
|`{header:'$name'}`|Header parameter
99+
|`{cookie:'$name'}`|Cookie parameter
100+
101+
**NOTE:**
102+
103+
- `'$name'` is variable placeholder
104+
- If `'$name'` is empty, use the name of field
105+
- If no position is tagged, use `body` first, followed by `query`
106+
- Expression `{required:true}` indicates that the parameter is required
107+
108+
109+
## Level
110+
111+
The level of handling tags:
112+
113+
|level|default|description|
114+
|-----|-------|-----------|
115+
|OnlyFirst|Yes|Handle only the first level field tags
116+
|FirstForUntagged|No|For untagged fields, only the first level is handled|
117+
|Any|No|Handle any level field tags|

0 commit comments

Comments
 (0)