Skip to content
New issue

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

Nested required does not work #15

Open
alexandru-calinoiu opened this issue Dec 22, 2016 · 0 comments
Open

Nested required does not work #15

alexandru-calinoiu opened this issue Dec 22, 2016 · 0 comments

Comments

@alexandru-calinoiu
Copy link
Member

In the following code snippet:

  post :create, '/v1/session', 'Login with your account' do
    description 'Create a user session.'
    params do
      body do
        hash :user, 'The user' do
          string :email, 'The email address', required: true
        end
      end
    end
    response 204, 'No body returned.'
  end
  def create
  end

I will get the following error on POST /v1/session I will get the following error:

{
  "message": "params[:email] must be a valid String"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant