Refine dynamic mock doc#4817
Conversation
✅ Deploy Preview for kongdeveloper ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
|
There was a problem hiding this comment.
Pull request overview
Updates Insomnia dynamic mocking documentation to more precisely describe the Liquid-based templating model and faker-driven data generation used when rendering mock responses.
Changes:
- Refines the dynamic mocking page to explicitly describe Liquid templates, the built-in
req/fakervariables, and supported tags/filters. - Updates terminology from “Faker template tags” to “faker variables” and refreshes Liquid documentation links.
- Aligns the mock servers landing page copy with the updated Liquid/faker terminology.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| app/insomnia/dynamic-mocking.md | Clarifies dynamic mocking as Liquid template rendering at request time, documents req/faker, supported tags, and references. |
| app/_landing_pages/insomnia/mock-servers.yaml | Updates landing page “Dynamic mocking” copy to reference Liquid and faker variables. |
52bd089 to
9e7b09c
Compare
| Traditional mocks return static, predefined payloads, while dynamic mocks generate context-aware, variable outputs. | ||
|
|
||
| For adding random values, Insomnia provides [**Faker template tags**](/insomnia/template-tags/) that you can insert anywhere that tags are supported. | ||
| For adding random values, Insomnia provides faker variables that you can insert anywhere in the response body. |
There was a problem hiding this comment.
@Guaris, after the release, how relevant is the template-tags page?
There was a problem hiding this comment.
Probably not very relevant and we can remove
There was a problem hiding this comment.
The Faker variables supported in Dynamic Mock are unrelated to the original Template tags.
| --- | ||
|
|
||
| Dynamic mocking extends Insomnia’s existing mock server feature by evaluating templates at request time so responses can change based on the incoming request or defined template logic. You configure routes in Insomnia and serve them from Self-hosted mock servers. Headers and status codes remain configured per route, which ensures consistency while response data updates dynamically. | ||
| Dynamic mocking extends Insomnia’s existing mock server feature by evaluating Liquid templates at request time so the response body can change based on the incoming request, and can include randomly generated fake data. You can use the Liquid template language in the Mock Body tab of a mock route in the Insomnia app to define a dynamic response body. Response headers and status codes remain configured per route, which ensures consistency while the response body updates dynamically. |
There was a problem hiding this comment.
This option only appears when Auto Generate is selected. It only determines whether mock routes can use dynamic mock tags when created via the AI Auto Generate feature.
For the manual creation process (Start from scratch), this option will not be shown, and users can always use dynamic mock tags.
There was a problem hiding this comment.
Thank you for the explanation!
juliamrch
left a comment
There was a problem hiding this comment.
lgtm, will test and add further clarifications on a new PR.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Kong/developer.konghq.com/sessions/8be40d68-4447-4c4c-a3f2-87ae4c7ce415 Co-authored-by: juliamrch <101819212+juliamrch@users.noreply.github.com>
9e7b09c to
85e1885
Compare
* Refine dynamic mock doc. * Update app/_landing_pages/insomnia/mock-servers.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fix subject-verb agreement: use "subset" with "is" Agent-Logs-Url: https://github.com/Kong/developer.konghq.com/sessions/8be40d68-4447-4c4c-a3f2-87ae4c7ce415 Co-authored-by: juliamrch <101819212+juliamrch@users.noreply.github.com> --------- Co-authored-by: Julia March <julia.navarro@konghq.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: juliamrch <101819212+juliamrch@users.noreply.github.com>

Description
I think the "test options for a mock route in the Insomnia app" section is not related to dynamic mocking — it covers general mock functionality and should be moved to a different page.
Fixes #issue
Preview Links
Checklist
descriptionentry in frontmatter.