vscode-json-languageservice 3.8.2 → 3.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -406,7 +406,7 @@ var JSONSchemaService = /** @class */ (function () {
|
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
408
|
}
|
|
409
|
-
collectEntries(next.items, next.additionalProperties, next.not, next.contains, next.propertyNames, next.if, next.then, next.else);
|
|
409
|
+
collectEntries(next.items, next.additionalItems, next.additionalProperties, next.not, next.contains, next.propertyNames, next.if, next.then, next.else);
|
|
410
410
|
collectMapEntries(next.definitions, next.properties, next.patternProperties, next.dependencies);
|
|
411
411
|
collectArrayEntries(next.anyOf, next.allOf, next.oneOf, next.items);
|
|
412
412
|
};
|
|
@@ -475,7 +475,10 @@ var JSONSchemaService = /** @class */ (function () {
|
|
|
475
475
|
};
|
|
476
476
|
JSONSchemaService.prototype.getMatchingSchemas = function (document, jsonDocument, schema) {
|
|
477
477
|
if (schema) {
|
|
478
|
-
|
|
478
|
+
var id = schema.id || ('schemaservice://untitled/matchingSchemas/' + idCounter++);
|
|
479
|
+
return this.resolveSchemaContent(new UnresolvedSchema(schema), id, {}).then(function (resolvedSchema) {
|
|
480
|
+
return jsonDocument.getMatchingSchemas(resolvedSchema.schema).filter(function (s) { return !s.inverted; });
|
|
481
|
+
});
|
|
479
482
|
}
|
|
480
483
|
return this.getSchemaForResource(document.uri, jsonDocument).then(function (schema) {
|
|
481
484
|
if (schema) {
|
|
@@ -487,6 +490,7 @@ var JSONSchemaService = /** @class */ (function () {
|
|
|
487
490
|
return JSONSchemaService;
|
|
488
491
|
}());
|
|
489
492
|
export { JSONSchemaService };
|
|
493
|
+
var idCounter = 0;
|
|
490
494
|
function normalizeId(id) {
|
|
491
495
|
// remove trailing '#', normalize drive capitalization
|
|
492
496
|
try {
|
|
@@ -418,7 +418,7 @@
|
|
|
418
418
|
}
|
|
419
419
|
}
|
|
420
420
|
}
|
|
421
|
-
collectEntries(next.items, next.additionalProperties, next.not, next.contains, next.propertyNames, next.if, next.then, next.else);
|
|
421
|
+
collectEntries(next.items, next.additionalItems, next.additionalProperties, next.not, next.contains, next.propertyNames, next.if, next.then, next.else);
|
|
422
422
|
collectMapEntries(next.definitions, next.properties, next.patternProperties, next.dependencies);
|
|
423
423
|
collectArrayEntries(next.anyOf, next.allOf, next.oneOf, next.items);
|
|
424
424
|
};
|
|
@@ -487,7 +487,10 @@
|
|
|
487
487
|
};
|
|
488
488
|
JSONSchemaService.prototype.getMatchingSchemas = function (document, jsonDocument, schema) {
|
|
489
489
|
if (schema) {
|
|
490
|
-
|
|
490
|
+
var id = schema.id || ('schemaservice://untitled/matchingSchemas/' + idCounter++);
|
|
491
|
+
return this.resolveSchemaContent(new UnresolvedSchema(schema), id, {}).then(function (resolvedSchema) {
|
|
492
|
+
return jsonDocument.getMatchingSchemas(resolvedSchema.schema).filter(function (s) { return !s.inverted; });
|
|
493
|
+
});
|
|
491
494
|
}
|
|
492
495
|
return this.getSchemaForResource(document.uri, jsonDocument).then(function (schema) {
|
|
493
496
|
if (schema) {
|
|
@@ -499,6 +502,7 @@
|
|
|
499
502
|
return JSONSchemaService;
|
|
500
503
|
}());
|
|
501
504
|
exports.JSONSchemaService = JSONSchemaService;
|
|
505
|
+
var idCounter = 0;
|
|
502
506
|
function normalizeId(id) {
|
|
503
507
|
// remove trailing '#', normalize drive capitalization
|
|
504
508
|
try {
|