Skip to content

Commit

Permalink
Invalid string validation (#704)
Browse files Browse the repository at this point in the history
* Add test case for invalid string type validation

* docs: add changelog entry

---------

Co-authored-by: Danny van der Sluijs <[email protected]>
  • Loading branch information
snapshotpl and DannyvdSluijs committed Sep 20, 2024
1 parent eac0893 commit f0b0226
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
13 changes: 13 additions & 0 deletions tests/Constraints/ArraysTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}'
]
];
}
Expand Down

0 comments on commit f0b0226

Please sign in to comment.