@@ -346,9 +346,7 @@ class JsonSchema {
346
346
} else if (_root.schemaVersion == SchemaVersion .draft6) {
347
347
accessMap = _accessMapV6;
348
348
} else if (_root.schemaVersion >= SchemaVersion .draft2019_09) {
349
- final vocabMap = Map ()
350
- ..addAll (_vocabMaps)
351
- ..addAll (_customVocabMap);
349
+ final vocabMap = Map ()..addAll (_vocabMaps)..addAll (_customVocabMap);
352
350
this .metaschemaVocabulary.keys.forEach ((vocabUri) {
353
351
accessMap.addAll (vocabMap[vocabUri.toString ()]);
354
352
});
@@ -595,7 +593,7 @@ class JsonSchema {
595
593
// Follow JSON Pointer path of fragments if provided.
596
594
if (pathUri.fragment.isNotEmpty) {
597
595
final List <String > fragments = Uri .parse (pathUri.fragment).pathSegments;
598
- final foundSchema = _recursiveResolvePath (pathUri, fragments, baseSchema, refsEncountered);
596
+ final foundSchema = _recursiveResolvePath (pathUri, fragments. sublist ( 0 ) , baseSchema, refsEncountered);
599
597
_memomizedResults[currentPair] = foundSchema;
600
598
return foundSchema;
601
599
}
@@ -761,7 +759,7 @@ class JsonSchema {
761
759
// If currentSchema has additional values, then traverse both paths to find the result.
762
760
if (i + 1 < fragments.length && currentSchema._schemaMap.keys.toSet ().difference (consts).length > 1 ) {
763
761
return _resolveParallelPaths (
764
- pathUri, fragments.sublist (i, fragments.length - 1 ), currentSchema, refsEncountered);
762
+ pathUri, fragments.sublist (i + 1 , fragments.length), currentSchema, refsEncountered);
765
763
}
766
764
767
765
currentSchema = _resolveSchemaWithAccounting (pathUri, currentSchema, refsEncountered);
0 commit comments