-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Description
It would be nice to allow a value to be specified on a given so that different parameters could be included for example:
params do
requires :grant_type, type: String, values: [:password, :refresh_token]
requires :client_id, type: String
given :grant_type, value: ->(*) { |attr| attr == :password } do
requires :username, type: String
requires :password, type: String
end
given :grant_type, value: ->(*) { |attr| attr == :refresh_token } do
requires :refresh_token, type: String
end
endRianaFerreira and glaucocustodio