Skip to content

Validation for Request Params #158

@atif

Description

@atif

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions