Add descriptions to fields

This commit is contained in:
Martin Lensment 2015-04-01 13:52:35 +03:00
parent 42001c4601
commit 28d0cfd4df
5 changed files with 32 additions and 31 deletions

View file

@ -5,9 +5,9 @@ module Repp
resource :contacts do
desc 'Return list of contact'
params do
optional :limit, type: Integer, values: (1..20).to_a
optional :offset, type: Integer
optional :details, type: String, values: %w(true false)
optional :limit, type: Integer, values: (1..20).to_a, desc: 'How many contacts to show'
optional :offset, type: Integer, desc: 'Contact number to start at'
optional :details, type: String, values: %w(true false), desc: 'Whether to include details'
end
get '/' do

View file

@ -5,9 +5,9 @@ module Repp
resource :domains do
desc 'Return list of domains'
params do
optional :limit, type: Integer, values: (1..20).to_a
optional :offset, type: Integer
optional :details, type: String, values: %w(true false)
optional :limit, type: Integer, values: (1..20).to_a, desc: 'How many domains to show'
optional :offset, type: Integer, desc: 'Domain number to start at'
optional :details, type: String, values: %w(true false), desc: 'Whether to include details'
end
get '/' do