We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It would be great if a list of allowed values could be specified for a parameter, something like:
params do optional :status, :type => Symbol, :values => [:not_started, :in_process, :done] end get 'tasks' do # list tasks, optionally filtered by status end
Then GET /tasks?status=done should return 200 OK, and GET /tasks?status=foobar should return 400 Bad Request.
GET /tasks?status=done
GET /tasks?status=foobar
I'm willing to try to implement this, if others are interested in such a feature.
The text was updated successfully, but these errors were encountered:
e7c44e0
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
It would be great if a list of allowed values could be specified for a parameter, something like:
Then
GET /tasks?status=done
should return 200 OK, andGET /tasks?status=foobar
should return 400 Bad Request.I'm willing to try to implement this, if others are interested in such a feature.
The text was updated successfully, but these errors were encountered: