Skip to content

Commit

Permalink
ruby-grape#91 Add some nested params to test API
Browse files Browse the repository at this point in the history
  • Loading branch information
davetapley committed Sep 19, 2014
1 parent fc7a2c9 commit 791943c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ class Api < Grape::API
desc 'Create a spline.'
params do
optional :reticulated, type: Boolean, default: true, desc: 'True if the spline is reticulated.'
requires :required_group, type: Hash do
requires :required_param_1
requires :required_param_2
end
end
post do
spline = { id: @@splines.size + 1, reticulated: params[:reticulated] }
Expand Down

0 comments on commit 791943c

Please sign in to comment.