From f8bdc0a6bce079f023a147fee46dad92e45909b5 Mon Sep 17 00:00:00 2001 From: Shreya Agarwal Date: Thu, 12 Oct 2023 00:00:19 +0530 Subject: [PATCH 1/5] Add new fake data helper to response-templating.md Helper added as part of https://github.com/wiremock/wiremock/pull/2438 --- _docs/response-templating.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/_docs/response-templating.md b/_docs/response-templating.md index f7de71dc..265f68c8 100644 --- a/_docs/response-templating.md +++ b/_docs/response-templating.md @@ -631,6 +631,19 @@ Likewise decimals can be produced with or without bounds: {% endraw %} +## Fake data helpers + +These helpers produce random fake data of the desired types available in the [Data Faker library]([url](https://github.com/datafaker-net/datafaker)). + +{% raw %} + +```handlebars +{{random 'Name.first_name'}} +{{random 'Address.postcode_by_state.AL' }} +``` + +{% endraw %} + ## Math helper The `math` (or maths, depending where you are) helper performs common arithmetic operations. It can accept integers, decimals @@ -921,4 +934,4 @@ public WireMockRule wm = new WireMockRule(options() The regular expressions are matched in a case-insensitive manner. -If no permitted system key patterns are set, a single default of `wiremock.*` will be used. \ No newline at end of file +If no permitted system key patterns are set, a single default of `wiremock.*` will be used. From b343a60ce3d177e2ef88fcfeda2c396e5dee7d77 Mon Sep 17 00:00:00 2001 From: Shreya Agarwal Date: Mon, 16 Oct 2023 22:13:44 +0530 Subject: [PATCH 2/5] Add extension details --- _docs/response-templating.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/_docs/response-templating.md b/_docs/response-templating.md index 265f68c8..57d28757 100644 --- a/_docs/response-templating.md +++ b/_docs/response-templating.md @@ -633,8 +633,7 @@ Likewise decimals can be produced with or without bounds: ## Fake data helpers -These helpers produce random fake data of the desired types available in the [Data Faker library]([url](https://github.com/datafaker-net/datafaker)). - +These helpers produce random fake data of the desired types available in the [Data Faker library]([url](https://github.com/datafaker-net/datafaker)). Due to the size of this library, this helper has been provided via an extension. See the [Extensions](../extensibility/adding-template-helpers/) page for more details on how to add template helper extensions. {% raw %} ```handlebars From 5e5b6acdb1534621e5f8b5e0cd199999a8f5a87f Mon Sep 17 00:00:00 2001 From: Shreya Agarwal Date: Mon, 16 Oct 2023 22:19:45 +0530 Subject: [PATCH 3/5] Update response-templating.md --- _docs/response-templating.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_docs/response-templating.md b/_docs/response-templating.md index 57d28757..8f39c295 100644 --- a/_docs/response-templating.md +++ b/_docs/response-templating.md @@ -633,7 +633,7 @@ Likewise decimals can be produced with or without bounds: ## Fake data helpers -These helpers produce random fake data of the desired types available in the [Data Faker library]([url](https://github.com/datafaker-net/datafaker)). Due to the size of this library, this helper has been provided via an extension. See the [Extensions](../extensibility/adding-template-helpers/) page for more details on how to add template helper extensions. +This helper produces random fake data of the desired types available in the [Data Faker library](https://github.com/datafaker-net/datafaker). Due to the size of this library, this helper has been provided via `RandomExtension`. {% raw %} ```handlebars From e60ed0085bb000778375bb628a3c36e8ac00fd36 Mon Sep 17 00:00:00 2001 From: Shreya Agarwal Date: Mon, 16 Oct 2023 22:21:24 +0530 Subject: [PATCH 4/5] Update response-templating.md add github repo --- _docs/response-templating.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_docs/response-templating.md b/_docs/response-templating.md index 8f39c295..86b3b0b6 100644 --- a/_docs/response-templating.md +++ b/_docs/response-templating.md @@ -633,7 +633,7 @@ Likewise decimals can be produced with or without bounds: ## Fake data helpers -This helper produces random fake data of the desired types available in the [Data Faker library](https://github.com/datafaker-net/datafaker). Due to the size of this library, this helper has been provided via `RandomExtension`. +This helper produces random fake data of the desired types available in the [Data Faker library](https://github.com/datafaker-net/datafaker). Due to the size of this library, this helper has been provided via [`RandomExtension`](https://github.com/Shreya-7/wiremock-faker-extension). {% raw %} ```handlebars From e38db5f844f630dc48c6cf1db468a8d300358a90 Mon Sep 17 00:00:00 2001 From: Shreya Agarwal Date: Wed, 18 Oct 2023 21:45:34 +0530 Subject: [PATCH 5/5] Update response-templating.md --- _docs/response-templating.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_docs/response-templating.md b/_docs/response-templating.md index 86b3b0b6..25072cdd 100644 --- a/_docs/response-templating.md +++ b/_docs/response-templating.md @@ -633,7 +633,7 @@ Likewise decimals can be produced with or without bounds: ## Fake data helpers -This helper produces random fake data of the desired types available in the [Data Faker library](https://github.com/datafaker-net/datafaker). Due to the size of this library, this helper has been provided via [`RandomExtension`](https://github.com/Shreya-7/wiremock-faker-extension). +This helper produces random fake data of the desired types available in the [Data Faker library](https://github.com/datafaker-net/datafaker). Due to the size of this library, this helper has been provided via [`RandomExtension`](https://github.com/wiremock/wiremock-faker-extension). {% raw %} ```handlebars