Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Commit

Permalink
Fixed a bug with rules that validated objects, where it just complete…
Browse files Browse the repository at this point in the history
…ly messed up
  • Loading branch information
Rico Nijeboer committed Aug 31, 2021
1 parent 0dc1705 commit 3aeed36
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes will be documented here.

## v2.4.3 - 31-08-2021

**Bugfixes**

- Fixed a bug with rules that validated objects, where it just completely messed up

## v2.4.2 - 30-08-2021

**Changes**
Expand Down
2 changes: 1 addition & 1 deletion src/Support/RuleHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ public static function openApiProperty(string $property, array $rules, array $ru

return [
'type' => 'object',
'properties' => collect($rules)
'properties' => collect(array_filter($rules, fn ($key) => !is_int($key), ARRAY_FILTER_USE_KEY))
->map(fn (array $r, string $key) => static::openApiProperty($key, $r, $ruleCache))
->toArray(),
];
Expand Down

0 comments on commit 3aeed36

Please sign in to comment.