Multiple examples with different parameters
timgent opened this issue · comments
Tim Gent commented
Hi,
Trying to create a spec with different example responses based on the input. This is to show the different responses that could come back from the same endpoint. However when running drakov I still get an identical response regardless of the request.
The spec is:
### Get birth events [GET /api/v0/events/person{?lastname}]
Get a list of people. Returns an empty list on no results found
+ Parameters
+ lastname: `Smith` (string, required)
+ Request A
+ Parameters:
+ lastname: `Gent`
+ Response 200
successful operation
+ Headers
content-type: application/json; charset=UTF-8
+ Body
[{"name": "Tim"}]
+ Request B
+ Parameters:
+ lastname: `Smith`
+ Response 200
successful operation
+ Headers
content-type: application/json; charset=UTF-8
+ Body
[]
Advice appreciated thanks!
Yakov Khalinsky commented
Thanks for the question, currently Drakov doesn't understand parameters, although under the hood we are storing information about them.
My hope would be that we could somehow do this in a future update.
I'll keep this open to help remind us of that