vscode-json-languageservice 5.0.0 → 5.1.1
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.
- package/CHANGELOG.md +10 -2
- package/lib/esm/jsonContributions.d.ts +17 -17
- package/lib/esm/jsonContributions.js +1 -1
- package/lib/esm/jsonLanguageService.d.ts +29 -29
- package/lib/esm/jsonLanguageService.js +66 -66
- package/lib/esm/jsonLanguageTypes.d.ts +292 -279
- package/lib/esm/jsonLanguageTypes.js +55 -46
- package/lib/esm/jsonSchema.d.ts +89 -89
- package/lib/esm/jsonSchema.js +1 -1
- package/lib/esm/parser/jsonParser.js +1236 -1214
- package/lib/esm/services/configuration.js +528 -528
- package/lib/esm/services/jsonCompletion.js +924 -918
- package/lib/esm/services/jsonDocumentSymbols.js +267 -267
- package/lib/esm/services/jsonFolding.js +120 -120
- package/lib/esm/services/jsonHover.js +109 -109
- package/lib/esm/services/jsonLinks.js +72 -72
- package/lib/esm/services/jsonSchemaService.js +593 -586
- package/lib/esm/services/jsonSelectionRanges.js +61 -61
- package/lib/esm/services/jsonValidation.js +151 -151
- package/lib/esm/utils/colors.js +68 -68
- package/lib/esm/utils/glob.js +124 -124
- package/lib/esm/utils/json.js +42 -42
- package/lib/esm/utils/objects.js +68 -68
- package/lib/esm/utils/strings.js +79 -64
- package/lib/umd/jsonContributions.d.ts +17 -17
- package/lib/umd/jsonContributions.js +12 -12
- package/lib/umd/jsonLanguageService.d.ts +29 -29
- package/lib/umd/jsonLanguageService.js +94 -90
- package/lib/umd/jsonLanguageTypes.d.ts +292 -279
- package/lib/umd/jsonLanguageTypes.js +103 -93
- package/lib/umd/jsonSchema.d.ts +89 -89
- package/lib/umd/jsonSchema.js +12 -12
- package/lib/umd/parser/jsonParser.js +1265 -1243
- package/lib/umd/services/configuration.js +541 -541
- package/lib/umd/services/jsonCompletion.js +938 -932
- package/lib/umd/services/jsonDocumentSymbols.js +281 -281
- package/lib/umd/services/jsonFolding.js +134 -134
- package/lib/umd/services/jsonHover.js +123 -123
- package/lib/umd/services/jsonLinks.js +86 -86
- package/lib/umd/services/jsonSchemaService.js +609 -602
- package/lib/umd/services/jsonSelectionRanges.js +75 -75
- package/lib/umd/services/jsonValidation.js +165 -165
- package/lib/umd/utils/colors.js +84 -84
- package/lib/umd/utils/glob.js +138 -138
- package/lib/umd/utils/json.js +56 -56
- package/lib/umd/utils/objects.js +87 -87
- package/lib/umd/utils/strings.js +98 -82
- package/package.json +11 -10
|
@@ -1,93 +1,103 @@
|
|
|
1
|
-
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
(function (factory) {
|
|
6
|
-
if (typeof module === "object" && typeof module.exports === "object") {
|
|
7
|
-
var v = factory(require, exports);
|
|
8
|
-
if (v !== undefined) module.exports = v;
|
|
9
|
-
}
|
|
10
|
-
else if (typeof define === "function" && define.amd) {
|
|
11
|
-
define(["require", "exports", "vscode-languageserver-types", "vscode-languageserver-textdocument"], factory);
|
|
12
|
-
}
|
|
13
|
-
})(function (require, exports) {
|
|
14
|
-
"use strict";
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.ClientCapabilities = exports.ErrorCode = exports.DocumentHighlightKind = exports.VersionedTextDocumentIdentifier = exports.TextDocumentEdit = exports.CodeActionKind = exports.TextEdit = exports.WorkspaceEdit = exports.DocumentLink = exports.DocumentHighlight = exports.CodeAction = exports.Command = exports.CodeActionContext = exports.MarkedString = exports.Hover = exports.Location = exports.DocumentSymbol = exports.SymbolKind = exports.SymbolInformation = exports.InsertTextFormat = exports.CompletionItemTag = exports.CompletionList = exports.CompletionItemKind = exports.CompletionItem = exports.DiagnosticSeverity = exports.Diagnostic = exports.SelectionRange = exports.FoldingRangeKind = exports.FoldingRange = exports.ColorPresentation = exports.ColorInformation = exports.Color = exports.MarkupKind = exports.MarkupContent = exports.Position = exports.Range = exports.TextDocument = void 0;
|
|
17
|
-
const vscode_languageserver_types_1 = require("vscode-languageserver-types");
|
|
18
|
-
Object.defineProperty(exports, "Range", { enumerable: true, get: function () { return vscode_languageserver_types_1.Range; } });
|
|
19
|
-
Object.defineProperty(exports, "Position", { enumerable: true, get: function () { return vscode_languageserver_types_1.Position; } });
|
|
20
|
-
Object.defineProperty(exports, "
|
|
21
|
-
Object.defineProperty(exports, "
|
|
22
|
-
Object.defineProperty(exports, "
|
|
23
|
-
Object.defineProperty(exports, "
|
|
24
|
-
Object.defineProperty(exports, "
|
|
25
|
-
Object.defineProperty(exports, "
|
|
26
|
-
Object.defineProperty(exports, "
|
|
27
|
-
Object.defineProperty(exports, "
|
|
28
|
-
Object.defineProperty(exports, "
|
|
29
|
-
Object.defineProperty(exports, "
|
|
30
|
-
Object.defineProperty(exports, "
|
|
31
|
-
Object.defineProperty(exports, "
|
|
32
|
-
Object.defineProperty(exports, "
|
|
33
|
-
Object.defineProperty(exports, "
|
|
34
|
-
Object.defineProperty(exports, "
|
|
35
|
-
Object.defineProperty(exports, "
|
|
36
|
-
Object.defineProperty(exports, "
|
|
37
|
-
Object.defineProperty(exports, "
|
|
38
|
-
Object.defineProperty(exports, "
|
|
39
|
-
Object.defineProperty(exports, "
|
|
40
|
-
Object.defineProperty(exports, "
|
|
41
|
-
Object.defineProperty(exports, "
|
|
42
|
-
Object.defineProperty(exports, "
|
|
43
|
-
Object.defineProperty(exports, "
|
|
44
|
-
Object.defineProperty(exports, "
|
|
45
|
-
Object.defineProperty(exports, "
|
|
46
|
-
Object.defineProperty(exports, "
|
|
47
|
-
Object.defineProperty(exports, "
|
|
48
|
-
Object.defineProperty(exports, "
|
|
49
|
-
Object.defineProperty(exports, "
|
|
50
|
-
Object.defineProperty(exports, "
|
|
51
|
-
Object.defineProperty(exports, "
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
ErrorCode[ErrorCode["
|
|
61
|
-
ErrorCode[ErrorCode["
|
|
62
|
-
ErrorCode[ErrorCode["
|
|
63
|
-
ErrorCode[ErrorCode["
|
|
64
|
-
ErrorCode[ErrorCode["
|
|
65
|
-
ErrorCode[ErrorCode["
|
|
66
|
-
ErrorCode[ErrorCode["
|
|
67
|
-
ErrorCode[ErrorCode["
|
|
68
|
-
ErrorCode[ErrorCode["
|
|
69
|
-
ErrorCode[ErrorCode["
|
|
70
|
-
ErrorCode[ErrorCode["
|
|
71
|
-
ErrorCode[ErrorCode["
|
|
72
|
-
ErrorCode[ErrorCode["
|
|
73
|
-
ErrorCode[ErrorCode["
|
|
74
|
-
ErrorCode[ErrorCode["
|
|
75
|
-
ErrorCode[ErrorCode["
|
|
76
|
-
ErrorCode[ErrorCode["
|
|
77
|
-
ErrorCode[ErrorCode["
|
|
78
|
-
ErrorCode[ErrorCode["
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
(function (factory) {
|
|
6
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
7
|
+
var v = factory(require, exports);
|
|
8
|
+
if (v !== undefined) module.exports = v;
|
|
9
|
+
}
|
|
10
|
+
else if (typeof define === "function" && define.amd) {
|
|
11
|
+
define(["require", "exports", "vscode-languageserver-types", "vscode-languageserver-textdocument"], factory);
|
|
12
|
+
}
|
|
13
|
+
})(function (require, exports) {
|
|
14
|
+
"use strict";
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ClientCapabilities = exports.SchemaDraft = exports.ErrorCode = exports.DocumentHighlightKind = exports.VersionedTextDocumentIdentifier = exports.TextDocumentEdit = exports.CodeActionKind = exports.TextEdit = exports.WorkspaceEdit = exports.DocumentLink = exports.DocumentHighlight = exports.CodeAction = exports.Command = exports.CodeActionContext = exports.MarkedString = exports.Hover = exports.Location = exports.DocumentSymbol = exports.SymbolKind = exports.SymbolInformation = exports.InsertTextFormat = exports.CompletionItemTag = exports.CompletionList = exports.CompletionItemKind = exports.CompletionItem = exports.DiagnosticSeverity = exports.Diagnostic = exports.SelectionRange = exports.FoldingRangeKind = exports.FoldingRange = exports.ColorPresentation = exports.ColorInformation = exports.Color = exports.MarkupKind = exports.MarkupContent = exports.DocumentUri = exports.Position = exports.Range = exports.TextDocument = void 0;
|
|
17
|
+
const vscode_languageserver_types_1 = require("vscode-languageserver-types");
|
|
18
|
+
Object.defineProperty(exports, "Range", { enumerable: true, get: function () { return vscode_languageserver_types_1.Range; } });
|
|
19
|
+
Object.defineProperty(exports, "Position", { enumerable: true, get: function () { return vscode_languageserver_types_1.Position; } });
|
|
20
|
+
Object.defineProperty(exports, "DocumentUri", { enumerable: true, get: function () { return vscode_languageserver_types_1.DocumentUri; } });
|
|
21
|
+
Object.defineProperty(exports, "MarkupContent", { enumerable: true, get: function () { return vscode_languageserver_types_1.MarkupContent; } });
|
|
22
|
+
Object.defineProperty(exports, "MarkupKind", { enumerable: true, get: function () { return vscode_languageserver_types_1.MarkupKind; } });
|
|
23
|
+
Object.defineProperty(exports, "Color", { enumerable: true, get: function () { return vscode_languageserver_types_1.Color; } });
|
|
24
|
+
Object.defineProperty(exports, "ColorInformation", { enumerable: true, get: function () { return vscode_languageserver_types_1.ColorInformation; } });
|
|
25
|
+
Object.defineProperty(exports, "ColorPresentation", { enumerable: true, get: function () { return vscode_languageserver_types_1.ColorPresentation; } });
|
|
26
|
+
Object.defineProperty(exports, "FoldingRange", { enumerable: true, get: function () { return vscode_languageserver_types_1.FoldingRange; } });
|
|
27
|
+
Object.defineProperty(exports, "FoldingRangeKind", { enumerable: true, get: function () { return vscode_languageserver_types_1.FoldingRangeKind; } });
|
|
28
|
+
Object.defineProperty(exports, "SelectionRange", { enumerable: true, get: function () { return vscode_languageserver_types_1.SelectionRange; } });
|
|
29
|
+
Object.defineProperty(exports, "Diagnostic", { enumerable: true, get: function () { return vscode_languageserver_types_1.Diagnostic; } });
|
|
30
|
+
Object.defineProperty(exports, "DiagnosticSeverity", { enumerable: true, get: function () { return vscode_languageserver_types_1.DiagnosticSeverity; } });
|
|
31
|
+
Object.defineProperty(exports, "CompletionItem", { enumerable: true, get: function () { return vscode_languageserver_types_1.CompletionItem; } });
|
|
32
|
+
Object.defineProperty(exports, "CompletionItemKind", { enumerable: true, get: function () { return vscode_languageserver_types_1.CompletionItemKind; } });
|
|
33
|
+
Object.defineProperty(exports, "CompletionList", { enumerable: true, get: function () { return vscode_languageserver_types_1.CompletionList; } });
|
|
34
|
+
Object.defineProperty(exports, "CompletionItemTag", { enumerable: true, get: function () { return vscode_languageserver_types_1.CompletionItemTag; } });
|
|
35
|
+
Object.defineProperty(exports, "InsertTextFormat", { enumerable: true, get: function () { return vscode_languageserver_types_1.InsertTextFormat; } });
|
|
36
|
+
Object.defineProperty(exports, "SymbolInformation", { enumerable: true, get: function () { return vscode_languageserver_types_1.SymbolInformation; } });
|
|
37
|
+
Object.defineProperty(exports, "SymbolKind", { enumerable: true, get: function () { return vscode_languageserver_types_1.SymbolKind; } });
|
|
38
|
+
Object.defineProperty(exports, "DocumentSymbol", { enumerable: true, get: function () { return vscode_languageserver_types_1.DocumentSymbol; } });
|
|
39
|
+
Object.defineProperty(exports, "Location", { enumerable: true, get: function () { return vscode_languageserver_types_1.Location; } });
|
|
40
|
+
Object.defineProperty(exports, "Hover", { enumerable: true, get: function () { return vscode_languageserver_types_1.Hover; } });
|
|
41
|
+
Object.defineProperty(exports, "MarkedString", { enumerable: true, get: function () { return vscode_languageserver_types_1.MarkedString; } });
|
|
42
|
+
Object.defineProperty(exports, "CodeActionContext", { enumerable: true, get: function () { return vscode_languageserver_types_1.CodeActionContext; } });
|
|
43
|
+
Object.defineProperty(exports, "Command", { enumerable: true, get: function () { return vscode_languageserver_types_1.Command; } });
|
|
44
|
+
Object.defineProperty(exports, "CodeAction", { enumerable: true, get: function () { return vscode_languageserver_types_1.CodeAction; } });
|
|
45
|
+
Object.defineProperty(exports, "DocumentHighlight", { enumerable: true, get: function () { return vscode_languageserver_types_1.DocumentHighlight; } });
|
|
46
|
+
Object.defineProperty(exports, "DocumentLink", { enumerable: true, get: function () { return vscode_languageserver_types_1.DocumentLink; } });
|
|
47
|
+
Object.defineProperty(exports, "WorkspaceEdit", { enumerable: true, get: function () { return vscode_languageserver_types_1.WorkspaceEdit; } });
|
|
48
|
+
Object.defineProperty(exports, "TextEdit", { enumerable: true, get: function () { return vscode_languageserver_types_1.TextEdit; } });
|
|
49
|
+
Object.defineProperty(exports, "CodeActionKind", { enumerable: true, get: function () { return vscode_languageserver_types_1.CodeActionKind; } });
|
|
50
|
+
Object.defineProperty(exports, "TextDocumentEdit", { enumerable: true, get: function () { return vscode_languageserver_types_1.TextDocumentEdit; } });
|
|
51
|
+
Object.defineProperty(exports, "VersionedTextDocumentIdentifier", { enumerable: true, get: function () { return vscode_languageserver_types_1.VersionedTextDocumentIdentifier; } });
|
|
52
|
+
Object.defineProperty(exports, "DocumentHighlightKind", { enumerable: true, get: function () { return vscode_languageserver_types_1.DocumentHighlightKind; } });
|
|
53
|
+
const vscode_languageserver_textdocument_1 = require("vscode-languageserver-textdocument");
|
|
54
|
+
Object.defineProperty(exports, "TextDocument", { enumerable: true, get: function () { return vscode_languageserver_textdocument_1.TextDocument; } });
|
|
55
|
+
/**
|
|
56
|
+
* Error codes used by diagnostics
|
|
57
|
+
*/
|
|
58
|
+
var ErrorCode;
|
|
59
|
+
(function (ErrorCode) {
|
|
60
|
+
ErrorCode[ErrorCode["Undefined"] = 0] = "Undefined";
|
|
61
|
+
ErrorCode[ErrorCode["EnumValueMismatch"] = 1] = "EnumValueMismatch";
|
|
62
|
+
ErrorCode[ErrorCode["Deprecated"] = 2] = "Deprecated";
|
|
63
|
+
ErrorCode[ErrorCode["UnexpectedEndOfComment"] = 257] = "UnexpectedEndOfComment";
|
|
64
|
+
ErrorCode[ErrorCode["UnexpectedEndOfString"] = 258] = "UnexpectedEndOfString";
|
|
65
|
+
ErrorCode[ErrorCode["UnexpectedEndOfNumber"] = 259] = "UnexpectedEndOfNumber";
|
|
66
|
+
ErrorCode[ErrorCode["InvalidUnicode"] = 260] = "InvalidUnicode";
|
|
67
|
+
ErrorCode[ErrorCode["InvalidEscapeCharacter"] = 261] = "InvalidEscapeCharacter";
|
|
68
|
+
ErrorCode[ErrorCode["InvalidCharacter"] = 262] = "InvalidCharacter";
|
|
69
|
+
ErrorCode[ErrorCode["PropertyExpected"] = 513] = "PropertyExpected";
|
|
70
|
+
ErrorCode[ErrorCode["CommaExpected"] = 514] = "CommaExpected";
|
|
71
|
+
ErrorCode[ErrorCode["ColonExpected"] = 515] = "ColonExpected";
|
|
72
|
+
ErrorCode[ErrorCode["ValueExpected"] = 516] = "ValueExpected";
|
|
73
|
+
ErrorCode[ErrorCode["CommaOrCloseBacketExpected"] = 517] = "CommaOrCloseBacketExpected";
|
|
74
|
+
ErrorCode[ErrorCode["CommaOrCloseBraceExpected"] = 518] = "CommaOrCloseBraceExpected";
|
|
75
|
+
ErrorCode[ErrorCode["TrailingComma"] = 519] = "TrailingComma";
|
|
76
|
+
ErrorCode[ErrorCode["DuplicateKey"] = 520] = "DuplicateKey";
|
|
77
|
+
ErrorCode[ErrorCode["CommentNotPermitted"] = 521] = "CommentNotPermitted";
|
|
78
|
+
ErrorCode[ErrorCode["SchemaResolveError"] = 768] = "SchemaResolveError";
|
|
79
|
+
ErrorCode[ErrorCode["SchemaUnsupportedFeature"] = 769] = "SchemaUnsupportedFeature";
|
|
80
|
+
})(ErrorCode = exports.ErrorCode || (exports.ErrorCode = {}));
|
|
81
|
+
var SchemaDraft;
|
|
82
|
+
(function (SchemaDraft) {
|
|
83
|
+
SchemaDraft[SchemaDraft["v3"] = 3] = "v3";
|
|
84
|
+
SchemaDraft[SchemaDraft["v4"] = 4] = "v4";
|
|
85
|
+
SchemaDraft[SchemaDraft["v6"] = 6] = "v6";
|
|
86
|
+
SchemaDraft[SchemaDraft["v7"] = 7] = "v7";
|
|
87
|
+
SchemaDraft[SchemaDraft["v2019_09"] = 19] = "v2019_09";
|
|
88
|
+
SchemaDraft[SchemaDraft["v2020_12"] = 20] = "v2020_12";
|
|
89
|
+
})(SchemaDraft = exports.SchemaDraft || (exports.SchemaDraft = {}));
|
|
90
|
+
var ClientCapabilities;
|
|
91
|
+
(function (ClientCapabilities) {
|
|
92
|
+
ClientCapabilities.LATEST = {
|
|
93
|
+
textDocument: {
|
|
94
|
+
completion: {
|
|
95
|
+
completionItem: {
|
|
96
|
+
documentationFormat: [vscode_languageserver_types_1.MarkupKind.Markdown, vscode_languageserver_types_1.MarkupKind.PlainText],
|
|
97
|
+
commitCharactersSupport: true
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
})(ClientCapabilities = exports.ClientCapabilities || (exports.ClientCapabilities = {}));
|
|
103
|
+
});
|
package/lib/umd/jsonSchema.d.ts
CHANGED
|
@@ -1,89 +1,89 @@
|
|
|
1
|
-
export declare type JSONSchemaRef = JSONSchema | boolean;
|
|
2
|
-
export interface JSONSchema {
|
|
3
|
-
id?: string;
|
|
4
|
-
$id?: string;
|
|
5
|
-
$schema?: string;
|
|
6
|
-
type?: string | string[];
|
|
7
|
-
title?: string;
|
|
8
|
-
default?: any;
|
|
9
|
-
definitions?: {
|
|
10
|
-
[name: string]: JSONSchema;
|
|
11
|
-
};
|
|
12
|
-
description?: string;
|
|
13
|
-
properties?: JSONSchemaMap;
|
|
14
|
-
patternProperties?: JSONSchemaMap;
|
|
15
|
-
additionalProperties?: JSONSchemaRef;
|
|
16
|
-
minProperties?: number;
|
|
17
|
-
maxProperties?: number;
|
|
18
|
-
dependencies?: JSONSchemaMap | {
|
|
19
|
-
[prop: string]: string[];
|
|
20
|
-
};
|
|
21
|
-
items?: JSONSchemaRef | JSONSchemaRef[];
|
|
22
|
-
minItems?: number;
|
|
23
|
-
maxItems?: number;
|
|
24
|
-
uniqueItems?: boolean;
|
|
25
|
-
additionalItems?: JSONSchemaRef;
|
|
26
|
-
pattern?: string;
|
|
27
|
-
minLength?: number;
|
|
28
|
-
maxLength?: number;
|
|
29
|
-
minimum?: number;
|
|
30
|
-
maximum?: number;
|
|
31
|
-
exclusiveMinimum?: boolean | number;
|
|
32
|
-
exclusiveMaximum?: boolean | number;
|
|
33
|
-
multipleOf?: number;
|
|
34
|
-
required?: string[];
|
|
35
|
-
$ref?: string;
|
|
36
|
-
anyOf?: JSONSchemaRef[];
|
|
37
|
-
allOf?: JSONSchemaRef[];
|
|
38
|
-
oneOf?: JSONSchemaRef[];
|
|
39
|
-
not?: JSONSchemaRef;
|
|
40
|
-
enum?: any[];
|
|
41
|
-
format?: string;
|
|
42
|
-
const?: any;
|
|
43
|
-
contains?: JSONSchemaRef;
|
|
44
|
-
propertyNames?: JSONSchemaRef;
|
|
45
|
-
examples?: any[];
|
|
46
|
-
$comment?: string;
|
|
47
|
-
if?: JSONSchemaRef;
|
|
48
|
-
then?: JSONSchemaRef;
|
|
49
|
-
else?: JSONSchemaRef;
|
|
50
|
-
unevaluatedProperties?: boolean | JSONSchemaRef;
|
|
51
|
-
unevaluatedItems?: boolean | JSONSchemaRef;
|
|
52
|
-
minContains?: number;
|
|
53
|
-
maxContains?: number;
|
|
54
|
-
deprecated?: boolean;
|
|
55
|
-
dependentRequired?: {
|
|
56
|
-
[prop: string]: string[];
|
|
57
|
-
};
|
|
58
|
-
dependentSchemas?: JSONSchemaMap;
|
|
59
|
-
$defs?: {
|
|
60
|
-
[name: string]: JSONSchema;
|
|
61
|
-
};
|
|
62
|
-
$anchor?: string;
|
|
63
|
-
$recursiveRef?: string;
|
|
64
|
-
$recursiveAnchor?: string;
|
|
65
|
-
$vocabulary?: any;
|
|
66
|
-
prefixItems?: JSONSchemaRef[];
|
|
67
|
-
$dynamicRef?: string;
|
|
68
|
-
$dynamicAnchor?: string;
|
|
69
|
-
defaultSnippets?: {
|
|
70
|
-
label?: string;
|
|
71
|
-
description?: string;
|
|
72
|
-
markdownDescription?: string;
|
|
73
|
-
body?: any;
|
|
74
|
-
bodyText?: string;
|
|
75
|
-
}[];
|
|
76
|
-
errorMessage?: string;
|
|
77
|
-
patternErrorMessage?: string;
|
|
78
|
-
deprecationMessage?: string;
|
|
79
|
-
enumDescriptions?: string[];
|
|
80
|
-
markdownEnumDescriptions?: string[];
|
|
81
|
-
markdownDescription?: string;
|
|
82
|
-
doNotSuggest?: boolean;
|
|
83
|
-
suggestSortText?: string;
|
|
84
|
-
allowComments?: boolean;
|
|
85
|
-
allowTrailingCommas?: boolean;
|
|
86
|
-
}
|
|
87
|
-
export interface JSONSchemaMap {
|
|
88
|
-
[name: string]: JSONSchemaRef;
|
|
89
|
-
}
|
|
1
|
+
export declare type JSONSchemaRef = JSONSchema | boolean;
|
|
2
|
+
export interface JSONSchema {
|
|
3
|
+
id?: string;
|
|
4
|
+
$id?: string;
|
|
5
|
+
$schema?: string;
|
|
6
|
+
type?: string | string[];
|
|
7
|
+
title?: string;
|
|
8
|
+
default?: any;
|
|
9
|
+
definitions?: {
|
|
10
|
+
[name: string]: JSONSchema;
|
|
11
|
+
};
|
|
12
|
+
description?: string;
|
|
13
|
+
properties?: JSONSchemaMap;
|
|
14
|
+
patternProperties?: JSONSchemaMap;
|
|
15
|
+
additionalProperties?: JSONSchemaRef;
|
|
16
|
+
minProperties?: number;
|
|
17
|
+
maxProperties?: number;
|
|
18
|
+
dependencies?: JSONSchemaMap | {
|
|
19
|
+
[prop: string]: string[];
|
|
20
|
+
};
|
|
21
|
+
items?: JSONSchemaRef | JSONSchemaRef[];
|
|
22
|
+
minItems?: number;
|
|
23
|
+
maxItems?: number;
|
|
24
|
+
uniqueItems?: boolean;
|
|
25
|
+
additionalItems?: JSONSchemaRef;
|
|
26
|
+
pattern?: string;
|
|
27
|
+
minLength?: number;
|
|
28
|
+
maxLength?: number;
|
|
29
|
+
minimum?: number;
|
|
30
|
+
maximum?: number;
|
|
31
|
+
exclusiveMinimum?: boolean | number;
|
|
32
|
+
exclusiveMaximum?: boolean | number;
|
|
33
|
+
multipleOf?: number;
|
|
34
|
+
required?: string[];
|
|
35
|
+
$ref?: string;
|
|
36
|
+
anyOf?: JSONSchemaRef[];
|
|
37
|
+
allOf?: JSONSchemaRef[];
|
|
38
|
+
oneOf?: JSONSchemaRef[];
|
|
39
|
+
not?: JSONSchemaRef;
|
|
40
|
+
enum?: any[];
|
|
41
|
+
format?: string;
|
|
42
|
+
const?: any;
|
|
43
|
+
contains?: JSONSchemaRef;
|
|
44
|
+
propertyNames?: JSONSchemaRef;
|
|
45
|
+
examples?: any[];
|
|
46
|
+
$comment?: string;
|
|
47
|
+
if?: JSONSchemaRef;
|
|
48
|
+
then?: JSONSchemaRef;
|
|
49
|
+
else?: JSONSchemaRef;
|
|
50
|
+
unevaluatedProperties?: boolean | JSONSchemaRef;
|
|
51
|
+
unevaluatedItems?: boolean | JSONSchemaRef;
|
|
52
|
+
minContains?: number;
|
|
53
|
+
maxContains?: number;
|
|
54
|
+
deprecated?: boolean;
|
|
55
|
+
dependentRequired?: {
|
|
56
|
+
[prop: string]: string[];
|
|
57
|
+
};
|
|
58
|
+
dependentSchemas?: JSONSchemaMap;
|
|
59
|
+
$defs?: {
|
|
60
|
+
[name: string]: JSONSchema;
|
|
61
|
+
};
|
|
62
|
+
$anchor?: string;
|
|
63
|
+
$recursiveRef?: string;
|
|
64
|
+
$recursiveAnchor?: string;
|
|
65
|
+
$vocabulary?: any;
|
|
66
|
+
prefixItems?: JSONSchemaRef[];
|
|
67
|
+
$dynamicRef?: string;
|
|
68
|
+
$dynamicAnchor?: string;
|
|
69
|
+
defaultSnippets?: {
|
|
70
|
+
label?: string;
|
|
71
|
+
description?: string;
|
|
72
|
+
markdownDescription?: string;
|
|
73
|
+
body?: any;
|
|
74
|
+
bodyText?: string;
|
|
75
|
+
}[];
|
|
76
|
+
errorMessage?: string;
|
|
77
|
+
patternErrorMessage?: string;
|
|
78
|
+
deprecationMessage?: string;
|
|
79
|
+
enumDescriptions?: string[];
|
|
80
|
+
markdownEnumDescriptions?: string[];
|
|
81
|
+
markdownDescription?: string;
|
|
82
|
+
doNotSuggest?: boolean;
|
|
83
|
+
suggestSortText?: string;
|
|
84
|
+
allowComments?: boolean;
|
|
85
|
+
allowTrailingCommas?: boolean;
|
|
86
|
+
}
|
|
87
|
+
export interface JSONSchemaMap {
|
|
88
|
+
[name: string]: JSONSchemaRef;
|
|
89
|
+
}
|
package/lib/umd/jsonSchema.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
(function (factory) {
|
|
2
|
-
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
-
var v = factory(require, exports);
|
|
4
|
-
if (v !== undefined) module.exports = v;
|
|
5
|
-
}
|
|
6
|
-
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports"], factory);
|
|
8
|
-
}
|
|
9
|
-
})(function (require, exports) {
|
|
10
|
-
"use strict";
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
});
|
|
1
|
+
(function (factory) {
|
|
2
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
+
var v = factory(require, exports);
|
|
4
|
+
if (v !== undefined) module.exports = v;
|
|
5
|
+
}
|
|
6
|
+
else if (typeof define === "function" && define.amd) {
|
|
7
|
+
define(["require", "exports"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
});
|