fix-311: add a comment and a detailed test-case
This commit is contained in:
parent
396ffbb663
commit
e2f3586dc6
@ -226,6 +226,7 @@ public:
|
||||
// for each token create an object, if not already existing
|
||||
auto unk_kw = &file.unknown_keywords;
|
||||
for (auto &rt : ref_tokens) {
|
||||
// create a json_pointer from rt as rt can be an stringified integer doing find on an array won't work
|
||||
json::json_pointer rt_ptr{"/" + rt};
|
||||
if (unk_kw->contains(rt_ptr) == false)
|
||||
(*unk_kw)[rt] = json::object();
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
{
|
||||
"element": [1]
|
||||
"element": [1],
|
||||
"element2": "test"
|
||||
}
|
||||
|
||||
@ -3,6 +3,9 @@
|
||||
"properties": {
|
||||
"element": {
|
||||
"$ref": "#/$defs/element"
|
||||
},
|
||||
"element2": {
|
||||
"$ref": "#/$defs/element/items/0/$defs/element2"
|
||||
}
|
||||
},
|
||||
"$defs": {
|
||||
@ -10,7 +13,11 @@
|
||||
"type": "array",
|
||||
"items": [
|
||||
{
|
||||
"$comment": "the comment should not lead to fail of loading schema",
|
||||
"$defs": {
|
||||
"element2": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "number"
|
||||
}
|
||||
]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user