Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support body params to be an array. #68

Open
d0972058277 opened this issue Jul 19, 2019 · 1 comment
Open

support body params to be an array. #68

d0972058277 opened this issue Jul 19, 2019 · 1 comment
Labels

Comments

@d0972058277
Copy link

d0972058277 commented Jul 19, 2019

目前遇到了一個難題
本身的Params就是一個Array的形式
Example:
[ { 'Key': 'Value' } ]
然而 @Body 只支援
{ 'List': [ { 'Key': 'Value' } ] }
是否能加入一個 @Bodys 的方法
讓swagger.json中的
schema: { type: 'object' }
變成
schema: { type: 'array' }

@Cody2333
Copy link
Owner

现在 body 外默认加了一层 schema: { type: 'object' },所以不支持 body 是 array 的情况,下一个版本更新会考虑兼容 type: 'array' 的情况。

@Cody2333 Cody2333 changed the title 請問是否能增加一個@bodys的方法? 支持 body 为 Array 的情况 Jul 23, 2019
@Cody2333 Cody2333 changed the title 支持 body 为 Array 的情况 support body params to be an array. Aug 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants