@swagger-api/apidom-ns-json-schema-draft-6 1.0.0-beta.2 → 1.0.0-beta.23
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 +89 -0
- package/LICENSES/AFL-3.0.txt +182 -0
- package/LICENSES/BSD-3-Clause.txt +26 -0
- package/NOTICE +26 -0
- package/dist/apidom-ns-json-schema-draft-6.browser.js +1 -1
- package/package.json +9 -9
- package/src/elements/JSONSchema.cjs +3 -0
- package/src/elements/JSONSchema.mjs +3 -0
- package/src/elements/LinkDescription.cjs +1 -0
- package/src/elements/LinkDescription.mjs +1 -0
- package/src/index.cjs +7 -1
- package/src/index.mjs +5 -1
- package/src/media-types.cjs +11 -0
- package/src/media-types.mjs +12 -0
- package/src/namespace.cjs +3 -0
- package/src/namespace.mjs +3 -0
- package/src/predicates.cjs +7 -0
- package/src/predicates.mjs +8 -0
- package/src/refractor/index.cjs +7 -0
- package/src/refractor/index.mjs +7 -0
- package/src/refractor/plugins/replace-empty-element.cjs +4 -0
- package/src/refractor/plugins/replace-empty-element.mjs +4 -0
- package/src/refractor/visitors/json-schema/ExamplesVisitor.cjs +3 -0
- package/src/refractor/visitors/json-schema/ExamplesVisitor.mjs +3 -0
- package/src/refractor/visitors/json-schema/ItemsVisitor.cjs +4 -18
- package/src/refractor/visitors/json-schema/ItemsVisitor.mjs +6 -20
- package/src/refractor/visitors/json-schema/index.cjs +12 -7
- package/src/refractor/visitors/json-schema/index.mjs +13 -8
- package/src/refractor/visitors/json-schema/link-description/index.cjs +4 -4
- package/src/refractor/visitors/json-schema/link-description/index.mjs +5 -5
- package/src/traversal/visitor.cjs +5 -8
- package/src/traversal/visitor.mjs +5 -8
- package/types/apidom-ns-json-schema-draft-6.d.ts +517 -0
- package/types/dist.d.ts +0 -304
package/types/dist.d.ts
DELETED
|
@@ -1,304 +0,0 @@
|
|
|
1
|
-
import * as _swagger_api_apidom_core from '@swagger-api/apidom-core';
|
|
2
|
-
import { MediaTypes, NamespacePluginOptions, StringElement, Element, Meta, Attributes, NumberElement, BooleanElement, ArrayElement, ObjectElement } from '@swagger-api/apidom-core';
|
|
3
|
-
export { isArrayElement, isBooleanElement, isElement, isLinkElement, isMemberElement, isNullElement, isNumberElement, isObjectElement, isRefElement, isStringElement } from '@swagger-api/apidom-core';
|
|
4
|
-
import * as minim from 'minim';
|
|
5
|
-
import * as _swagger_api_apidom_ns_json_schema_draft_4 from '@swagger-api/apidom-ns-json-schema-draft-4';
|
|
6
|
-
import { specificationObj, JSONSchemaElement, JSONReferenceElement, LinkDescriptionElement, FixedFieldsVisitorOptions, FallbackVisitorOptions, SpecPath, FixedFieldsVisitor, FallbackVisitor, SpecificationVisitorOptions, ParentSchemaAwareVisitorOptions, SpecificationVisitor, ParentSchemaAwareVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
|
|
7
|
-
export { AllOfVisitorOptions, AlternatingVisitor, AlternatingVisitorOptions, AnyOfVisitorOptions, DefinitionsVisitorOptions, DependenciesVisitorOptions, FallbackVisitorOptions as ExamplesVisitorOptions, FallbackVisitor, FallbackVisitorOptions, FixedFieldsVisitor, FixedFieldsVisitorOptions, JSONReferenceElement, MapVisitor, MapVisitorOptions, MediaElement, OneOfVisitorOptions, ParentSchemaAwareVisitor, ParentSchemaAwareVisitorOptions, PatternPropertiesVisitorOptions, PatternedFieldsVisitor, PatternedFieldsVisitorOptions, PropertiesVisitorOptions, SchemaOrReferenceVisitorOptions, SpecPath, SpecificationVisitor, SpecificationVisitorOptions, Visitor, VisitorOptions, isJSONReferenceElement, isJSONReferenceLikeElement, isMediaElement } from '@swagger-api/apidom-ns-json-schema-draft-4';
|
|
8
|
-
import * as ts_mixer_dist_types_types_js from 'ts-mixer/dist/types/types.js';
|
|
9
|
-
|
|
10
|
-
type Format = 'generic' | 'json' | 'yaml';
|
|
11
|
-
declare class JSONSchemaDraft6MediaTypes extends MediaTypes<string> {
|
|
12
|
-
filterByFormat(format?: Format): string[];
|
|
13
|
-
findBy(version?: string, format?: Format): string;
|
|
14
|
-
latest(format?: Format): string;
|
|
15
|
-
}
|
|
16
|
-
declare const mediaTypes: JSONSchemaDraft6MediaTypes;
|
|
17
|
-
|
|
18
|
-
declare const jsonSchemaDraft6: {
|
|
19
|
-
namespace: (options: NamespacePluginOptions) => minim.Namespace;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
declare const plugin: () => () => {
|
|
23
|
-
visitor: {
|
|
24
|
-
StringElement(element: StringElement, key: any, parent: any, path: any, ancestors: any[]): any;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
declare const refract: <T extends Element>(value: unknown, { specPath, plugins, specificationObj, }?: {
|
|
29
|
-
specPath?: string[] | undefined;
|
|
30
|
-
plugins?: never[] | undefined;
|
|
31
|
-
specificationObj?: {
|
|
32
|
-
visitors: {
|
|
33
|
-
value: typeof _swagger_api_apidom_ns_json_schema_draft_4.FallbackVisitor;
|
|
34
|
-
JSONSchemaOrJSONReferenceVisitor: typeof _swagger_api_apidom_ns_json_schema_draft_4.SchemaOrReferenceVisitor;
|
|
35
|
-
document: {
|
|
36
|
-
objects: {
|
|
37
|
-
JSONSchema: {
|
|
38
|
-
$visitor: typeof _swagger_api_apidom_ns_json_schema_draft_4.JSONSchemaVisitor;
|
|
39
|
-
fixedFields: {
|
|
40
|
-
id: {
|
|
41
|
-
$ref: string;
|
|
42
|
-
};
|
|
43
|
-
$schema: {
|
|
44
|
-
$ref: string;
|
|
45
|
-
};
|
|
46
|
-
multipleOf: {
|
|
47
|
-
$ref: string;
|
|
48
|
-
};
|
|
49
|
-
maximum: {
|
|
50
|
-
$ref: string;
|
|
51
|
-
};
|
|
52
|
-
exclusiveMaximum: {
|
|
53
|
-
$ref: string;
|
|
54
|
-
};
|
|
55
|
-
minimum: {
|
|
56
|
-
$ref: string;
|
|
57
|
-
};
|
|
58
|
-
exclusiveMinimum: {
|
|
59
|
-
$ref: string;
|
|
60
|
-
};
|
|
61
|
-
maxLength: {
|
|
62
|
-
$ref: string;
|
|
63
|
-
};
|
|
64
|
-
minLength: {
|
|
65
|
-
$ref: string;
|
|
66
|
-
};
|
|
67
|
-
pattern: {
|
|
68
|
-
$ref: string;
|
|
69
|
-
};
|
|
70
|
-
additionalItems: typeof _swagger_api_apidom_ns_json_schema_draft_4.SchemaOrReferenceVisitor;
|
|
71
|
-
items: typeof _swagger_api_apidom_ns_json_schema_draft_4.ItemsVisitor;
|
|
72
|
-
maxItems: {
|
|
73
|
-
$ref: string;
|
|
74
|
-
};
|
|
75
|
-
minItems: {
|
|
76
|
-
$ref: string;
|
|
77
|
-
};
|
|
78
|
-
uniqueItems: {
|
|
79
|
-
$ref: string;
|
|
80
|
-
};
|
|
81
|
-
maxProperties: {
|
|
82
|
-
$ref: string;
|
|
83
|
-
};
|
|
84
|
-
minProperties: {
|
|
85
|
-
$ref: string;
|
|
86
|
-
};
|
|
87
|
-
required: typeof _swagger_api_apidom_ns_json_schema_draft_4.RequiredVisitor;
|
|
88
|
-
properties: typeof _swagger_api_apidom_ns_json_schema_draft_4.PropertiesVisitor;
|
|
89
|
-
additionalProperties: typeof _swagger_api_apidom_ns_json_schema_draft_4.SchemaOrReferenceVisitor;
|
|
90
|
-
patternProperties: typeof _swagger_api_apidom_ns_json_schema_draft_4.PatternPropertiesVisitor;
|
|
91
|
-
dependencies: typeof _swagger_api_apidom_ns_json_schema_draft_4.DependenciesVisitor;
|
|
92
|
-
enum: typeof _swagger_api_apidom_ns_json_schema_draft_4.EnumVisitor;
|
|
93
|
-
type: typeof _swagger_api_apidom_ns_json_schema_draft_4.TypeVisitor;
|
|
94
|
-
allOf: typeof _swagger_api_apidom_ns_json_schema_draft_4.AllOfVisitor;
|
|
95
|
-
anyOf: typeof _swagger_api_apidom_ns_json_schema_draft_4.AnyOfVisitor;
|
|
96
|
-
oneOf: typeof _swagger_api_apidom_ns_json_schema_draft_4.OneOfVisitor;
|
|
97
|
-
not: typeof _swagger_api_apidom_ns_json_schema_draft_4.SchemaOrReferenceVisitor;
|
|
98
|
-
definitions: typeof _swagger_api_apidom_ns_json_schema_draft_4.DefinitionsVisitor;
|
|
99
|
-
title: {
|
|
100
|
-
$ref: string;
|
|
101
|
-
};
|
|
102
|
-
description: {
|
|
103
|
-
$ref: string;
|
|
104
|
-
};
|
|
105
|
-
default: {
|
|
106
|
-
$ref: string;
|
|
107
|
-
};
|
|
108
|
-
format: {
|
|
109
|
-
$ref: string;
|
|
110
|
-
};
|
|
111
|
-
base: {
|
|
112
|
-
$ref: string;
|
|
113
|
-
};
|
|
114
|
-
links: typeof _swagger_api_apidom_ns_json_schema_draft_4.LinksVisitor;
|
|
115
|
-
media: {
|
|
116
|
-
$ref: string;
|
|
117
|
-
};
|
|
118
|
-
readOnly: {
|
|
119
|
-
$ref: string;
|
|
120
|
-
};
|
|
121
|
-
};
|
|
122
|
-
};
|
|
123
|
-
JSONReference: {
|
|
124
|
-
$visitor: typeof _swagger_api_apidom_ns_json_schema_draft_4.JSONReferenceVisitor;
|
|
125
|
-
fixedFields: {
|
|
126
|
-
$ref: typeof _swagger_api_apidom_ns_json_schema_draft_4.JSONReference$RefVisitor;
|
|
127
|
-
};
|
|
128
|
-
};
|
|
129
|
-
Media: {
|
|
130
|
-
$visitor: typeof _swagger_api_apidom_ns_json_schema_draft_4.MediaVisitor;
|
|
131
|
-
fixedFields: {
|
|
132
|
-
binaryEncoding: {
|
|
133
|
-
$ref: string;
|
|
134
|
-
};
|
|
135
|
-
type: {
|
|
136
|
-
$ref: string;
|
|
137
|
-
};
|
|
138
|
-
};
|
|
139
|
-
};
|
|
140
|
-
LinkDescription: {
|
|
141
|
-
$visitor: typeof _swagger_api_apidom_ns_json_schema_draft_4.LinkDescriptionVisitor;
|
|
142
|
-
fixedFields: {
|
|
143
|
-
href: {
|
|
144
|
-
$ref: string;
|
|
145
|
-
};
|
|
146
|
-
rel: {
|
|
147
|
-
$ref: string;
|
|
148
|
-
};
|
|
149
|
-
title: {
|
|
150
|
-
$ref: string;
|
|
151
|
-
};
|
|
152
|
-
targetSchema: typeof _swagger_api_apidom_ns_json_schema_draft_4.SchemaOrReferenceVisitor;
|
|
153
|
-
mediaType: {
|
|
154
|
-
$ref: string;
|
|
155
|
-
};
|
|
156
|
-
method: {
|
|
157
|
-
$ref: string;
|
|
158
|
-
};
|
|
159
|
-
encType: {
|
|
160
|
-
$ref: string;
|
|
161
|
-
};
|
|
162
|
-
schema: typeof _swagger_api_apidom_ns_json_schema_draft_4.SchemaOrReferenceVisitor;
|
|
163
|
-
};
|
|
164
|
-
};
|
|
165
|
-
};
|
|
166
|
-
};
|
|
167
|
-
};
|
|
168
|
-
} | undefined;
|
|
169
|
-
}) => T;
|
|
170
|
-
declare const createRefractor: (specPath: string[]) => (value: unknown, options?: {}) => Element;
|
|
171
|
-
|
|
172
|
-
declare const _default: typeof specificationObj;
|
|
173
|
-
|
|
174
|
-
declare class JSONSchema extends JSONSchemaElement {
|
|
175
|
-
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes);
|
|
176
|
-
/**
|
|
177
|
-
* Core vocabulary
|
|
178
|
-
*
|
|
179
|
-
* URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-01
|
|
180
|
-
*/
|
|
181
|
-
get idProp(): StringElement | undefined;
|
|
182
|
-
set idProp(id: StringElement | undefined);
|
|
183
|
-
get $id(): StringElement | undefined;
|
|
184
|
-
set $id($id: StringElement | undefined);
|
|
185
|
-
/**
|
|
186
|
-
* Validation vocabulary
|
|
187
|
-
*
|
|
188
|
-
* URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-validation-01
|
|
189
|
-
*/
|
|
190
|
-
/**
|
|
191
|
-
* Validation keywords for numeric instances (number and integer)
|
|
192
|
-
*/
|
|
193
|
-
get exclusiveMaximum(): NumberElement | undefined;
|
|
194
|
-
set exclusiveMaximum(exclusiveMaximum: NumberElement | undefined);
|
|
195
|
-
get exclusiveMinimum(): NumberElement | undefined;
|
|
196
|
-
set exclusiveMinimum(exclusiveMinimum: NumberElement | undefined);
|
|
197
|
-
/**
|
|
198
|
-
* Validation keywords for arrays
|
|
199
|
-
*/
|
|
200
|
-
get containsProp(): this | BooleanElement | JSONReferenceElement | undefined;
|
|
201
|
-
set containsProp(contains: this | BooleanElement | JSONReferenceElement | undefined);
|
|
202
|
-
get items(): this | BooleanElement | JSONReferenceElement | ArrayElement | undefined | any;
|
|
203
|
-
set items(items: this | BooleanElement | JSONReferenceElement | ArrayElement | undefined | any);
|
|
204
|
-
/**
|
|
205
|
-
* Validation keywords for objects
|
|
206
|
-
*/
|
|
207
|
-
get propertyNames(): this | BooleanElement | JSONReferenceElement | undefined;
|
|
208
|
-
set propertyNames(propertyNames: this | BooleanElement | JSONReferenceElement | undefined);
|
|
209
|
-
/**
|
|
210
|
-
* Validation keywords for any instance type
|
|
211
|
-
*/
|
|
212
|
-
get const(): Element | undefined;
|
|
213
|
-
set const(constValue: Element | undefined);
|
|
214
|
-
get not(): this | BooleanElement | JSONReferenceElement | undefined | any;
|
|
215
|
-
set not(not: this | BooleanElement | JSONReferenceElement | undefined | any);
|
|
216
|
-
/**
|
|
217
|
-
* Metadata keywords
|
|
218
|
-
*
|
|
219
|
-
* URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-validation-01#section-7
|
|
220
|
-
*/
|
|
221
|
-
get examples(): ArrayElement | undefined;
|
|
222
|
-
set examples(examples: ArrayElement | undefined);
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-hyperschema-01#section-6
|
|
227
|
-
*/
|
|
228
|
-
declare class LinkDescription extends LinkDescriptionElement {
|
|
229
|
-
get hrefSchema(): JSONSchema | BooleanElement | JSONReferenceElement | undefined;
|
|
230
|
-
set hrefSchema(hrefSchema: JSONSchema | BooleanElement | JSONReferenceElement | undefined);
|
|
231
|
-
get targetSchema(): JSONSchema | BooleanElement | JSONReferenceElement | undefined | any;
|
|
232
|
-
set targetSchema(targetSchema: JSONSchema | BooleanElement | JSONReferenceElement | undefined | any);
|
|
233
|
-
get schema(): JSONSchema | JSONReferenceElement | undefined;
|
|
234
|
-
set schema(schema: JSONSchema | JSONReferenceElement | undefined);
|
|
235
|
-
get submissionSchema(): JSONSchema | BooleanElement | JSONReferenceElement | undefined;
|
|
236
|
-
set submissionSchema(submissionSchema: JSONSchema | BooleanElement | JSONReferenceElement | undefined);
|
|
237
|
-
get method(): StringElement | undefined;
|
|
238
|
-
set method(method: StringElement | undefined);
|
|
239
|
-
get encType(): StringElement | undefined;
|
|
240
|
-
set encType(encType: StringElement | undefined);
|
|
241
|
-
get submissionEncType(): StringElement | undefined;
|
|
242
|
-
set submissionEncType(submissionEncType: StringElement | undefined);
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
declare const isJSONSchemaElement: _swagger_api_apidom_core.ElementPredicate<JSONSchema>;
|
|
246
|
-
declare const isLinkDescriptionElement: _swagger_api_apidom_core.ElementPredicate<LinkDescription>;
|
|
247
|
-
|
|
248
|
-
interface LinkDescriptionVisitorOptions extends FixedFieldsVisitorOptions, FallbackVisitorOptions {
|
|
249
|
-
}
|
|
250
|
-
declare const LinkDescriptionVisitor_base: ts_mixer_dist_types_types_js.Class<any[], FixedFieldsVisitor & FallbackVisitor, typeof FixedFieldsVisitor & typeof FallbackVisitor>;
|
|
251
|
-
declare class LinkDescriptionVisitor extends LinkDescriptionVisitor_base {
|
|
252
|
-
readonly element: LinkDescription;
|
|
253
|
-
protected readonly specPath: SpecPath<['document', 'objects', 'LinkDescription']>;
|
|
254
|
-
constructor(options: LinkDescriptionVisitorOptions);
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
interface JSONSchemaVisitorOptions extends FixedFieldsVisitorOptions, FallbackVisitorOptions {
|
|
258
|
-
}
|
|
259
|
-
declare const JSONSchemaVisitor_base: ts_mixer_dist_types_types_js.Class<any[], FixedFieldsVisitor & FallbackVisitor, typeof FixedFieldsVisitor & typeof FallbackVisitor>;
|
|
260
|
-
declare class JSONSchemaVisitor extends JSONSchemaVisitor_base {
|
|
261
|
-
element: JSONSchema;
|
|
262
|
-
protected readonly specPath: SpecPath<['document', 'objects', 'JSONSchema']>;
|
|
263
|
-
constructor(options: JSONSchemaVisitorOptions);
|
|
264
|
-
ObjectElement(objectElement: ObjectElement): {};
|
|
265
|
-
BooleanElement(booleanElement: BooleanElement): {};
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
declare class ExamplesVisitor extends FallbackVisitor {
|
|
269
|
-
readonly element: ArrayElement;
|
|
270
|
-
ArrayElement(arrayElement: ArrayElement): {};
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
interface ItemsVisitorOptions extends SpecificationVisitorOptions, ParentSchemaAwareVisitorOptions, FallbackVisitorOptions {
|
|
274
|
-
}
|
|
275
|
-
declare const ItemsVisitor_base: ts_mixer_dist_types_types_js.Class<any[], SpecificationVisitor & ParentSchemaAwareVisitor & FallbackVisitor, typeof SpecificationVisitor & typeof ParentSchemaAwareVisitor & typeof FallbackVisitor>;
|
|
276
|
-
declare class ItemsVisitor extends ItemsVisitor_base {
|
|
277
|
-
element: ObjectElement | ArrayElement;
|
|
278
|
-
ObjectElement(objectElement: ObjectElement): {};
|
|
279
|
-
ArrayElement(arrayElement: ArrayElement): {};
|
|
280
|
-
BooleanElement(booleanElement: BooleanElement): {};
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
declare const getNodeType: <T extends Element>(element: T) => string | undefined;
|
|
284
|
-
declare const keyMap: {
|
|
285
|
-
ObjectElement: string[];
|
|
286
|
-
ArrayElement: string[];
|
|
287
|
-
MemberElement: string[];
|
|
288
|
-
StringElement: never[];
|
|
289
|
-
BooleanElement: never[];
|
|
290
|
-
NumberElement: never[];
|
|
291
|
-
NullElement: never[];
|
|
292
|
-
RefElement: never[];
|
|
293
|
-
LinkElement: never[];
|
|
294
|
-
Annotation: never[];
|
|
295
|
-
Comment: never[];
|
|
296
|
-
ParseResultElement: string[];
|
|
297
|
-
SourceMap: string[];
|
|
298
|
-
JSONSchemaDraft6Element: string[];
|
|
299
|
-
JSONReferenceElement: string[];
|
|
300
|
-
MediaElement: string[];
|
|
301
|
-
LinkDescriptionElement: string[];
|
|
302
|
-
};
|
|
303
|
-
|
|
304
|
-
export { ExamplesVisitor, ItemsVisitor, type ItemsVisitorOptions, JSONSchemaDraft6MediaTypes, JSONSchema as JSONSchemaElement, JSONSchemaVisitor, type JSONSchemaVisitorOptions, LinkDescription as LinkDescriptionElement, LinkDescriptionVisitor, type LinkDescriptionVisitorOptions, createRefractor, jsonSchemaDraft6 as default, getNodeType, isJSONSchemaElement, isLinkDescriptionElement, keyMap, mediaTypes, refract, plugin as refractorPluginReplaceEmptyElement, _default as specificationObj };
|