Skip to content

feat(Insomnia): clarify dynamic mocking and faker usage#4969

Open
juliamrch wants to merge 3 commits intorelease/insomnia-v12.6from
insomnia-dynamic-mock-clarity
Open

feat(Insomnia): clarify dynamic mocking and faker usage#4969
juliamrch wants to merge 3 commits intorelease/insomnia-v12.6from
insomnia-dynamic-mock-clarity

Conversation

@juliamrch
Copy link
Copy Markdown
Contributor

@juliamrch juliamrch commented Apr 22, 2026

Description

This PR clarifies the Dynamic Mocking features with:

  • A tab comparing static vs dynamic mocks.
  • Examples
  • More details on how to use faker variables (previously, the docs linked to the mockbin with no further explanations).

Fixes #4965

Preview Links

Current docs VS. this PR

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).

@juliamrch juliamrch self-assigned this Apr 22, 2026
@juliamrch juliamrch closed this Apr 22, 2026
@juliamrch juliamrch force-pushed the insomnia-dynamic-mock-clarity branch from 00e33f0 to 06187df Compare April 22, 2026 13:25
@juliamrch juliamrch reopened this Apr 22, 2026
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 22, 2026

Deploy Preview for kongdeveloper ready!

Name Link
🔨 Latest commit cd86420
🔍 Latest deploy log https://app.netlify.com/projects/kongdeveloper/deploys/69ea1e374c787600080c6bf9
😎 Deploy Preview https://deploy-preview-4969--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.

@juliamrch juliamrch force-pushed the release/insomnia-v12.6 branch from 57c0ccb to adcfd35 Compare April 22, 2026 14:58
@juliamrch juliamrch force-pushed the insomnia-dynamic-mock-clarity branch from 06187df to 2335d8c Compare April 22, 2026 15:34
@juliamrch juliamrch marked this pull request as ready for review April 23, 2026 13:07
@juliamrch juliamrch requested a review from a team as a code owner April 23, 2026 13:07
Copilot AI review requested due to automatic review settings April 23, 2026 13:07
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

Clarifies Insomnia’s Dynamic Mocking documentation by explaining how Liquid templates are rendered at request time, contrasting static vs dynamic mocks, and expanding guidance on faker variables.

Changes:

  • Reworks the intro to describe request-time Liquid rendering and the kinds of dynamic data supported.
  • Adds a table comparing static vs dynamic mocks and a short “how to” for configuring mock bodies.
  • Expands faker variable guidance and adds an example using fakerFunctions.

Comment thread app/insomnia/dynamic-mocking.md
Comment thread app/insomnia/dynamic-mocking.md Outdated
Comment thread app/insomnia/dynamic-mocking.md Outdated
Comment thread app/insomnia/dynamic-mocking.md Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
```

For a complete list of available faker variables, go to [**run.js#L218**](https://github.com/Kong/insomnia-mockbin/blob/04134cf81ce29ae7ffcc7ee13e2ecbce70414a96/lib/routes/bins/run.js#L218).
For a complete list of available faker variables, go to [**run.js#L218**](https://github.com/Kong/insomnia-mockbin/blob/04134cf81ce29ae7ffcc7ee13e2ecbce70414a96/lib/routes/bins/run.js#L218). Use the names listed under `fakerFunctions` (such as `guid`, `randomFullName`, `randomPhoneNumber`, etc.). For example:
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.

Thoughts about this:

  • If this code gets moved around, line 218 could be line 318 one day and we wouldn't be aware of it/could be directing users to the wrong thing.
  • No definition or curation to the variables, so for example, I have no way to know what this is used for or when to use it:
randomAbstractImage: () =>
		faker.image.urlLoremFlickr({ category: "abstract" }),

I think if the list of variables is worth documenting, it should live in the docs. Maybe as an include files that gets pulled into this. And, then the variables could have some sort of description. Alternatively, curating some example variables and descriptions would work.

I think this is Postman's version of this info:
https://learning.postman.com/docs/tests-and-scripts/write-scripts/variables-list/

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.

3 participants