From 148321c091ed5d640b34faa044f0847f46d5af99 Mon Sep 17 00:00:00 2001 From: Witold Wasiczko Date: Thu, 29 Feb 2024 09:15:54 +0100 Subject: [PATCH 1/2] Add test case for invalid string type validation --- tests/Constraints/ArraysTest.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 + } + } + }' ] ]; } From 4e07a50f578f9a90e1c5017ea6b003155e64bdf5 Mon Sep 17 00:00:00 2001 From: Danny van der Sluijs Date: Fri, 20 Sep 2024 13:36:28 +0200 Subject: [PATCH 2/2] docs: add changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) 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))