Skip to content

Commit fe43877

Browse files
committed
Updated faker examples to remove deprecated methods
1 parent c0b9e21 commit fe43877

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,16 @@ paths:
8282
properties:
8383
firstName:
8484
type: string
85-
x-faker: name.firstName
85+
x-faker: person.firstName
8686
lastName:
8787
type: string
88-
x-faker: name.lastName
88+
x-faker: person.lastName
8989
fullName:
9090
type: string
91-
x-faker: '{{name.firstName}} {{name.lastName}}'
91+
x-faker: '{{person.firstName}} {{person.lastName}}'
9292
age:
9393
type: string
94-
x-faker: 'random.number({ "min": 1, "max": 20 })'
94+
x-faker: 'number.int({ "min": 1, "max": 20 })'
9595

9696
```
9797

@@ -106,9 +106,9 @@ A JSON response similar to the following would be produced:
106106
```
107107

108108
The _x-faker_ extension accepts values in 3 forms:
109-
1. _fakerNamespace.method_. e.g. `random.uuid`
110-
2. _fakerNamespace.method({ "methodArgs": "in", "json": "format" })_. e.g. `random.number({ "max": 100 })`
111-
3. A mustache template string making use of the 2 forms above. e.g. `My name is {{name.firstName}} {{name.lastName}}`
109+
1. _fakerNamespace.method_. e.g. `string.uuid`
110+
2. _fakerNamespace.method({ "methodArgs": "in", "json": "format" })_. e.g. `number.int({ "max": 100 })`
111+
3. A mustache template string making use of the 2 forms above. e.g. `My name is {{person.firstName}} {{person.lastName}}`
112112

113113
*NOTE*: To avoid new fake data from being generated on every call, up to 10 responses per endpoint are cached
114114
based on the incoming query string, request body and headers.

0 commit comments

Comments
 (0)