Skip to content

Commit dd8615e

Browse files
committed
docs: release 0.1.2
1 parent 5e61482 commit dd8615e

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

Diff for: CHANGELOG.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## [Unreleased]
88

9+
## [0.1.3] - 2020-11-03
10+
11+
### Added
12+
- Support for passing options.
13+
- Added `minItems`, `maxItems` and `alwaysFakeOptionals` options.
14+
915
## [0.1.1]
1016
### Added
1117
- Support for `anyOf` keyword
@@ -21,6 +27,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
2127

2228
Initial release!
2329

24-
[Unreleased]: https://github.com/canvural/php-openapi-faker/compare/0.1.1...HEAD
30+
[Unreleased]: https://github.com/canvural/php-openapi-faker/compare/0.1.3...HEAD
31+
[0.1.3]: https://github.com/canvural/php-openapi-faker/compare/0.1.2...0.1.3
2532
[0.1.1]: https://github.com/canvural/php-openapi-faker/compare/0.1.0...0.1.1
2633
[0.1.0]: https://github.com/canvural/php-openapi-faker/releases/tag/0.1.0

Diff for: README.md

+21
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,27 @@ Then you can use `mockResponse`, `mockRequest` and `mockSchema` methods on it to
3333
$fakeData = $faker->mockResponse('/todos','GET');
3434
```
3535

36+
### Options
37+
38+
There are some options you can use to modify some behaviour. You can pass options as an associative array to `setOptions` method in `OpenAPIFaker`. For example:
39+
40+
```php
41+
$faker = \Vural\OpenAPIFaker\OpenAPIFaker::createFromJson($yourSchemaAsJson)
42+
->setOptions(['minItems' => 5]);
43+
```
44+
45+
Below you can find explanation for each option.
46+
47+
#### `minItems`
48+
Overrides `minItems` property if it's less than this value.
49+
50+
#### `maxItems`
51+
Override `maxItems` if it's greater than this value.
52+
53+
### `alwaysFakeOptionals`
54+
55+
If enabled, every property or item will be generated regardless if they are required or not. **Default**: `false`
56+
3657
## Changelog
3758

3859
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

0 commit comments

Comments
 (0)