Skip to content

Commit 889f303

Browse files
Address code review feedback on documentation
- Update test comment with actual reproduction repo link - Add clarification about 'properties' keyword in SCHEMA_KEYWORDS - Improve documentation for better understanding Co-authored-by: DannyvdSluijs <618940+DannyvdSluijs@users.noreply.github.com>
1 parent 68ceb58 commit 889f303

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/JsonSchema/SchemaStorage.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ class SchemaStorage implements SchemaStorageInterface
1616

1717
/**
1818
* JSON Schema keywords that indicate an object is a schema with validation rules,
19-
* not a pure container (like definitions, properties)
19+
* not a pure container (like the value of definitions or properties keywords).
20+
*
21+
* Note: 'properties' is a schema keyword (e.g., {"type": "object", "properties": {...}}).
22+
* The properties *container* (the value) won't have these keywords, so it won't match.
2023
*/
2124
private const SCHEMA_KEYWORDS = [
2225
'type', 'properties', 'items', 'additionalProperties', 'additionalItems',

tests/SchemaStorageTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,8 @@ public function testNoDoubleResolve(): void
308308

309309
/**
310310
* Test that definitions named 'enum' or 'const' are properly resolved
311-
* Regression test for: https://github.com/jsonrainbow/json-schema/issues/XXX
311+
* Regression test for UnresolvableJsonPointerException when definitions are named 'enum' or 'const'
312+
* Related to: https://github.com/mxr576/oas-validation-issue-on-v6
312313
*/
313314
public function testDefinitionNamedEnumIsResolved(): void
314315
{

0 commit comments

Comments
 (0)