Skip to content

Instantly share code, notes, and snippets.

@fltiago
Last active April 23, 2019 00:21
Show Gist options
  • Save fltiago/6705828 to your computer and use it in GitHub Desktop.
Save fltiago/6705828 to your computer and use it in GitHub Desktop.
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