Last active
April 23, 2019 00:21
-
-
Save fltiago/6705828 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
params do | |
requires :internal_reference, type: String, primary_reference: true, desc: "Internal reference" | |
end | |
post 'debug' do | |
present params | |
end | |
class PrimaryReference < Grape::Validations::Validator | |
def validate_param!(attr_name, params) | |
# code goes gere | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment