Yoni Goldberg
09/28/2023, 7:30 AMTom
09/28/2023, 8:33 AMexamples:
one:
summary: First example
x-parameter-values:
id: abc123
category: staff
search: things
value: |
{ "name": "John" }
two:
summary: Second example
x-parameter-values:
id: cba321
value: |
{ "name": "Jeff" }
And a stub will be generated for each example with request matchers using the parameter values you’ve specified.Yoni Goldberg
09/28/2023, 9:29 AMTom
09/28/2023, 12:54 PMx-scenario
equalTo
deleted-user
, so you’ll only see that response if if that header value is present.
For a stub to be generated that works this way you’d have to declare x-scenario
in the parameters
section, then add something like this to the response example:
x-parameter-values:
x-scenario: deleted-user
Yoni Goldberg
09/28/2023, 1:25 PM