You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior, if applicable:
The code is
info (
consumes: "application/json"produces: "application/json"
)
2. The error is
生成结果为:
consumes: "application/x-www-form-urlencoded"
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Environments (please complete the following information):**
- OS: [e.g. Linux]
- go-zero version [e.g. 1.2.1]
- goctl version [e.g. 1.2.1, optional]
**More description**
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
kevwan
changed the title
swagger 指定info consumes: "application/json" 后生成结果不生效
Swagger info consumes: "application/json" setting doesn't take effect in generated output
May 15, 2025
@fanqie Thanks for your contribution, as you noted, the consumes and produces does not work now, all of the consumes generate from the structure tag in request body, and all of the produces are fixed value application/json,now you can ignore it and I'll support it in the future.
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior, if applicable:
The code is
)
The text was updated successfully, but these errors were encountered: