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

Required params and GET methods #53

Closed
charly-palencia opened this issue May 7, 2015 · 2 comments
Closed

Required params and GET methods #53

charly-palencia opened this issue May 7, 2015 · 2 comments
Labels

Comments

@charly-palencia
Copy link

Example

If i create something like this:

.
.
.
## Car [/api/car/{id}{?color}] 
+ Parameters 
  + id: `12` (string,required) 
  + color: `red` (string,required) 
.
.
.
.

Expected behaviour

When i send a request like get /api/var/12
Then i should receive some error about validate parameters

Problem

If i send the request above i'm receiving a valid request(200 status response). is that ok? (i'm new with drakov. so, i want to be sure that i'm not doing anything wrong (probably i did )

thanks for you help

@charly-palencia charly-palencia changed the title Additional required params into get request Required params and GET methods May 8, 2015
@yakovkhalinsky
Copy link
Contributor

Hi @charly-palencia the way it works is drakov matches from specific to less specific.

That way you can have request/response pairs for different combinations of query parameters.

In you case it means that a GET with no query parameters will still match.

Hope that makes sense 🎱

@charly-palencia
Copy link
Author

yeah! that's what i need! thank you so much @yakovkhalinsky !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants