grape api参数为array

 

https://github.com/ruby-grape/grape

https://github.com/ruby-grape/grape#param

 

 

requires :subject_id_list, type: Array[String], allow_blank: false

请求的时候只能依次请求

http://111.11.1.1:1100/api/v1/ats?subject_id_list[]=1&subject_id_list[]=2

 

posted @ 2016-03-04 14:31  冰凌花花~  阅读(243)  评论(0编辑  收藏  举报