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

Validation for Request Params #158

Open
atif opened this issue Mar 10, 2017 · 1 comment
Open

Validation for Request Params #158

atif opened this issue Mar 10, 2017 · 1 comment

Comments

@atif
Copy link

atif commented Mar 10, 2017

I am trying to mock a MSON file using Drakov. The file is loaded properly and server runs at port 3000. One of my request url in file is:

Get history books [GET /books/{id}?type=history]

  • Parameter

    • id : 1 (number, required) - ID of book
      • Default: 20
  • Response 200 (application/json; charset=utf-8)

    • Attributes (fixed-type)
      • Include Book
      • bookdetail (array[BookDetails], fixed-type)
      • book_size: 4343 (number)

What I want is that in case user sends 'id' which is not number, it should respond with different error code i.e some sort of validation should be in place. Does Drakov support this feature?

Thanks.

  • Atif
@atif
Copy link
Author

atif commented Mar 13, 2017

^ @marcelogo , @yakovkhalinsky

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