UNPKG

2.04 kBTypeScriptView Raw
1import { JSONValue } from '@phosphor/coreutils';
2export declare type JsonType = 'string' | 'array' | 'number' | 'integer' | 'object' | 'boolean' | 'null';
3/**
4 * extended JSON schema
5 */
6export interface IJSONSchema {
7 id?: string;
8 $id?: string;
9 $schema?: string;
10 type?: JsonType | JsonType[];
11 title?: string;
12 default?: JSONValue;
13 definitions?: IJSONSchemaMap;
14 description?: string;
15 properties?: IJSONSchemaMap;
16 patternProperties?: IJSONSchemaMap;
17 additionalProperties?: boolean | IJSONSchema;
18 minProperties?: number;
19 maxProperties?: number;
20 dependencies?: IJSONSchemaMap | {
21 [prop: string]: string[];
22 };
23 items?: IJSONSchema | IJSONSchema[];
24 prefixItems?: IJSONSchema[];
25 minItems?: number;
26 maxItems?: number;
27 uniqueItems?: boolean;
28 additionalItems?: boolean | IJSONSchema;
29 pattern?: string;
30 minLength?: number;
31 maxLength?: number;
32 minimum?: number;
33 maximum?: number;
34 exclusiveMinimum?: boolean | number;
35 exclusiveMaximum?: boolean | number;
36 multipleOf?: number;
37 required?: string[];
38 $ref?: string;
39 anyOf?: IJSONSchema[];
40 allOf?: IJSONSchema[];
41 oneOf?: IJSONSchema[];
42 not?: IJSONSchema;
43 enum?: JSONValue[];
44 format?: string;
45 const?: JSONValue;
46 contains?: IJSONSchema;
47 propertyNames?: IJSONSchema;
48 $comment?: string;
49 if?: IJSONSchema;
50 then?: IJSONSchema;
51 else?: IJSONSchema;
52 defaultSnippets?: IJSONSchemaSnippet[];
53 errorMessage?: string;
54 patternErrorMessage?: string;
55 deprecationMessage?: string;
56 enumDescriptions?: string[];
57 markdownEnumDescriptions?: string[];
58 markdownDescription?: string;
59 doNotSuggest?: boolean;
60 allowComments?: boolean;
61 allowTrailingCommas?: boolean;
62}
63export interface IJSONSchemaMap {
64 [name: string]: IJSONSchema;
65}
66export interface IJSONSchemaSnippet {
67 label?: string;
68 description?: string;
69 body?: JSONValue;
70 bodyText?: string;
71}
72//# sourceMappingURL=json-schema.d.ts.map
\No newline at end of file