Cant define array params use param_type `body`
oslivan opened this issue · comments
Justin commented
Below is my code
desc do
summary 'Example'
end
params do
optional :words, type: Array[String], desc: 'Some word', documentation: { param_type: 'body' }
end
post do
# params[:words]
end
Due to only single array params, so swagger's doc didn't generate ref definition, reference to, I used Try it out
, found curl's script
without bring words
, so my app raised. I just want to submit params like below
# expected
{
words: ['A','B']
}
# actual
[
'A',
'B'
]
Have any other solution?
peter scholz commented
mmh, maybe you can write it as spec and open an PR …
peter scholz commented
sorry for latency …
commented on your above PR