Skip to content

Commit 6695ca3

Browse files
committed
add optional tests for $refing into known non-applicator keywords
1 parent cda4281 commit 6695ca3

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

tests/draft-next/optional/refOfUnknownKeyword.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,28 @@
4242
"valid": false
4343
}
4444
]
45+
},
46+
{
47+
"description": "reference internals of known non-applicator",
48+
"schema": {
49+
"$schema": "https://json-schema.org/draft/next/schema",
50+
"$id": "/base",
51+
"examples": [
52+
{ "type": "string" }
53+
],
54+
"$ref": "#/examples/0"
55+
},
56+
"tests": [
57+
{
58+
"description": "match",
59+
"data": "a string",
60+
"valid": true
61+
},
62+
{
63+
"description": "mismatch",
64+
"data": 42,
65+
"valid": false
66+
}
67+
]
4568
}
4669
]

0 commit comments

Comments
 (0)