mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-13 20:53:49 +08:00
优化响应中间件,自动识别响应数据格式
This commit is contained in:
@@ -10,7 +10,10 @@ type NotifyAliPayReq struct {
|
||||
g.Meta `path:"/pay/notify/alipay" method:"post" tags:"支付异步通知" summary:"支付宝回调"`
|
||||
}
|
||||
|
||||
type NotifyAliPayRes payin.PayNotifyModel
|
||||
type NotifyAliPayRes struct {
|
||||
g.Meta `mime:"text/html" type:"string" example:"<html/>"`
|
||||
payin.PayNotifyModel
|
||||
}
|
||||
|
||||
// NotifyWxPayReq 微信支付回调
|
||||
type NotifyWxPayReq struct {
|
||||
@@ -24,4 +27,7 @@ type NotifyQQPayReq struct {
|
||||
g.Meta `path:"/pay/notify/qqpay" method:"post" tags:"支付异步通知" summary:"QQ支付回调"`
|
||||
}
|
||||
|
||||
type NotifyQQPayRes payin.PayNotifyModel
|
||||
type NotifyQQPayRes struct {
|
||||
g.Meta `mime:"text/xml" type:"string" example:"<html/>"`
|
||||
payin.PayNotifyModel
|
||||
}
|
||||
|
||||
@@ -11,8 +11,9 @@ import (
|
||||
|
||||
type HelloReq struct {
|
||||
g.Meta `path:"/hello" tags:"Hello" method:"get" summary:"You first hello api"`
|
||||
Name string `json:"name" d:"hotgo" dc:"名字"`
|
||||
}
|
||||
|
||||
type HelloRes struct {
|
||||
g.Meta `mime:"text/html" example:"string"`
|
||||
Tips string `json:"tips"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user