grape-swagger-rails icon indicating copy to clipboard operation
grape-swagger-rails copied to clipboard

parameter is invalid when trying to pass Array in swagger

Open lsanc104 opened this issue 4 years ago • 1 comments

I was trying to do something like this, but I keep getting Error: items is invalid. Any help is welcome

requires :items, type: Array do requires :description, type: String, documentation: { desc: 'street', in: 'body' } requires :quantity, type: String, documentation: { desc: 'street', in: 'body' } requires :value, type: String, documentation: { desc: 'street', in: 'body' } requires :weight, type: String, documentation: { desc: 'street', in: 'body' } requires :hs_tariff_number, type: String, documentation: { desc: 'street', in: 'body' } requires :origin_country, type: String, documentation: { desc: 'street', in: 'body' } end

lsanc104 avatar May 06 '20 19:05 lsanc104

It would help if you could please post the request you're making or/and the stack for this error. I'll close this. Please use the Grape mailing list for questions.

Can you please post the stack for this error? Turn it into a speec?

dblock avatar May 06 '20 21:05 dblock