diff --git a/CHANGELOG.md b/CHANGELOG.md index 082c86fc..82b0e582 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Added - Add return types in the test suite ([#748](https://github.com/jsonrainbow/json-schema/pull/748)) +- Add test case for validating array of strings with objects ([#704](https://github.com/jsonrainbow/json-schema/pull/704)) ### Fixed - Correct misconfigured mocks in JsonSchema\Tests\Uri\UriRetrieverTest ([#741](https://github.com/jsonrainbow/json-schema/pull/741)) diff --git a/tests/Constraints/ArraysTest.php b/tests/Constraints/ArraysTest.php index 4b2eb576..bb11a091 100644 --- a/tests/Constraints/ArraysTest.php +++ b/tests/Constraints/ArraysTest.php @@ -116,6 +116,19 @@ public function getInvalidTests(): array } } }' + ], + [ + '{"data": [{"not_a_string_but_object":"string_but_in_object"}]}', + '{ + "type": "object", + "properties": { + "data": { + "type": "array", + "items": {"type":"string"}, + "additionalItems": false + } + } + }' ] ]; }