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

Stub value substitution using a template #1249

Merged
merged 23 commits into from
Aug 16, 2024
Merged

Conversation

joelrosario
Copy link
Member

What:

Introduce two templating features "{{REQUEST.QUERY-PARAMS.enabled}}" and "{{@DaTa}}", in order to coordinate values in example.

Why:

"{{REQUEST.QUERY-PARAMS.enabled}}" <- this allows a value from the request to be expected in the response. This way you won't have to provide multiple examples when the only difference is one value in the request and response, and they are coordinated.

"{{@DaTa}}" <- sometimes value A in the request should go with value B in the response. For example, let's say that when in the request JSON payload the value of department is engineering, the value of the location in the response JSON payload should be Bangalore, and the currency should be Rupees. This feature enables this coordination to be done in a single example file.

Checklist:

@joelrosario joelrosario self-assigned this Aug 16, 2024
@joelrosario joelrosario merged commit ae44363 into main Aug 16, 2024
2 checks passed
@joelrosario joelrosario deleted the stub_value_substitution branch August 16, 2024 15:13
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

Successfully merging this pull request may close these issues.

1 participant