Skip to content

Refine dynamic mock doc#4817

Merged
juliamrch merged 3 commits intorelease/insomnia-v12.6from
insomnia-dynamic-mock
Apr 22, 2026
Merged

Refine dynamic mock doc#4817
juliamrch merged 3 commits intorelease/insomnia-v12.6from
insomnia-dynamic-mock

Conversation

@yaoweiprc
Copy link
Copy Markdown

Description

  1. Updated the page description and introduction to accurately reflect that dynamic mocking uses the Liquid template language (instead of generic "templates").
  2. Replaced references to "Faker template tags" with "faker variables" to align with the actual implementation terminology.
  3. Replaced the old "Template reference examples" section title with "Template syntax" for clarity.
  4. Added a clear explanation of the two built-in Liquid variables available at request time: req and faker.
  5. Added a direct link to the faker variables reference in the Insomnia Mockbin source: run.js#L218.
  6. Updated Liquid tag reference links to use the English LiquidJS docs (liquidjs.com/tags/...) instead of the Chinese locale.
  7. Added a note that only the default filter is supported for filters.
  8. Minor prose improvements for grammar and precision.

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

  • Tested how-to docs. If not, note why here.
  • All pages contain metadata.
  • Any new docs link to existing docs.
  • All autogenerated instructions render correctly (API, decK, Konnect, Kong Manager).
  • Style guide (capitalized gateway entities, placeholder URLs) implemented correctly.
  • Every page has a description entry in frontmatter.
  • Add new pages to the product documentation index (if applicable).
  • [ ]

@yaoweiprc yaoweiprc requested a review from a team as a code owner April 10, 2026 10:01
Copilot AI review requested due to automatic review settings April 10, 2026 10:01
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 10, 2026

Deploy Preview for kongdeveloper ready!

Name Link
🔨 Latest commit 85e1885
🔍 Latest deploy log https://app.netlify.com/projects/kongdeveloper/deploys/69e8b8d16b626900085e77d7
😎 Deploy Preview https://deploy-preview-4817--kongdeveloper.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 10, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 3 committers have signed the CLA.

✅ juliamrch
❌ yaoweiprc
❌ Copilot
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/faker variables, 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.

Comment thread app/insomnia/dynamic-mocking.md Outdated
Comment thread app/_landing_pages/insomnia/mock-servers.yaml Outdated
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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Guaris, after the release, how relevant is the template-tags page?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not very relevant and we can remove

Copy link
Copy Markdown
Author

@yaoweiprc yaoweiprc Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could specify that to use dynamic mocking, users need to opt in when creating a new mock server (it'll be toggled off by default).

Image

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the explanation!

@Guaris Guaris changed the base branch from main to release/insomnia-v12.6 April 17, 2026 15:39
@Guaris Guaris changed the base branch from release/insomnia-v12.6 to main April 17, 2026 15:39
@Guaris Guaris changed the base branch from main to release/insomnia-v12.6 April 17, 2026 15:40
@juliamrch juliamrch mentioned this pull request Apr 22, 2026
2 tasks
Copy link
Copy Markdown
Contributor

@juliamrch juliamrch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, will test and add further clarifications on a new PR.

yaoweiprc and others added 3 commits April 22, 2026 14:02
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@juliamrch juliamrch force-pushed the insomnia-dynamic-mock branch from 9e7b09c to 85e1885 Compare April 22, 2026 12:02
@juliamrch juliamrch merged commit 66cb040 into release/insomnia-v12.6 Apr 22, 2026
21 of 24 checks passed
@juliamrch juliamrch deleted the insomnia-dynamic-mock branch April 22, 2026 12:31
juliamrch added a commit that referenced this pull request Apr 22, 2026
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants