You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First you need to create an instance of `OpenAPIFaker` with your schema that you want to fake data from.
25
+
First you need to create an instance of `OpenAPIFaker` with your schema that you want to fake data from. You can use `createFromJson`, `createFromYaml` or `createFromSchema` to create an instance of `OpenAPIFaker`.
Then you can use `mockResponse`, `mockRequest`and `mockSchema` methods on it to generate fake data for your requests, responses and schemas. Like so:
30
+
Then you can use `mockResponse`, `mockResponseForExample`, `mockRequest`, `mockRequestForExample`and `mockComponentSchema` methods on it to generate fake data for your requests, responses and schemas. Like so:
31
31
32
32
```php
33
33
$fakeData = $faker->mockResponse('/todos','GET');
@@ -54,6 +54,10 @@ Override `maxItems` if it's greater than this value.
54
54
55
55
If enabled, every property or item will be generated regardless if they are required or not. **Default**: `false`
56
56
57
+
### `strategy`
58
+
By default, `OpenAPIFaker` uses a dynamic generation strategy. You can enable the static examples generation by using the `static` strategy.
59
+
**Default**: `dynamic`
60
+
57
61
## Changelog
58
62
59
63
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
0 commit comments