ruby-grape / grape-swagger-rails

Swagger UI as Rails Engine for grape-swagger gem.
MIT License
251 stars 197 forks source link

parameter is invalid when trying to pass Array in swagger #101

Open lsanc104 opened 4 years ago

lsanc104 commented 4 years ago

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

dblock commented 4 years ago

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?