zeromicro / go-zero

A cloud-native Go microservices framework with cli tool for productivity.
https://go-zero.dev
MIT License
29.31k stars 3.96k forks source link

Does go-zero API definition support JSON arrays? #4390

Open error0g opened 1 month ago

error0g commented 1 month ago

json body example: [ { "id": 1 }, { "id": 2 } ] How do I define it in the API file?

smithyj commented 1 month ago

不支持直接传数组

Issues-translate-bot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Direct passing of arrays is not supported

alanxiongxing commented 2 weeks ago

我也遇到了,咋解决呀?"RuleList": [{"targetValue":"699","warningValue":"599"},{"targetValue":"699","warningValue":"599"}]

Issues-translate-bot commented 2 weeks ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


I've encountered this too, how to solve it? "RuleList": [{"targetValue":"699","warningValue":"599"},{"targetValue":"699","warningValue":"599"}]