@swagger-api/apidom-ns-json-schema-draft-7 0.99.1 → 0.99.2
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 +4 -0
- package/cjs/index.cjs +2 -1
- package/cjs/refractor/index.cjs +5 -7
- package/cjs/refractor/specification.cjs +2 -13
- package/cjs/refractor/visitors/json-schema/index.cjs +15 -19
- package/cjs/refractor/visitors/json-schema/link-description/index.cjs +6 -7
- package/dist/apidom-ns-json-schema-draft-7.browser.js +1 -1
- package/es/index.mjs +1 -1
- package/es/refractor/index.mjs +5 -7
- package/es/refractor/specification.mjs +2 -13
- package/es/refractor/visitors/json-schema/index.mjs +15 -19
- package/es/refractor/visitors/json-schema/link-description/index.mjs +6 -7
- package/package.json +7 -7
- package/types/dist.d.ts +249 -112
- package/cjs/refractor/visitors/json-schema/$commentVisitor.cjs +0 -7
- package/cjs/refractor/visitors/json-schema/ContentEncodingVisitor.cjs +0 -7
- package/cjs/refractor/visitors/json-schema/ContentMediaTypeVisitor.cjs +0 -7
- package/cjs/refractor/visitors/json-schema/WriteOnlyVisitor.cjs +0 -7
- package/cjs/refractor/visitors/json-schema/link-description/$commentVisitor.cjs +0 -7
- package/cjs/refractor/visitors/json-schema/link-description/AnchorPointerVisitor.cjs +0 -7
- package/cjs/refractor/visitors/json-schema/link-description/AnchorVisitor.cjs +0 -7
- package/cjs/refractor/visitors/json-schema/link-description/DescriptionVisitor.cjs +0 -7
- package/cjs/refractor/visitors/json-schema/link-description/SubmissionMediaTypeVisitor.cjs +0 -7
- package/cjs/refractor/visitors/json-schema/link-description/TargetHintsVisitor.cjs +0 -7
- package/cjs/refractor/visitors/json-schema/link-description/TargetMediaTypeVisitor.cjs +0 -7
- package/cjs/refractor/visitors/json-schema/link-description/TemplatePointersVisitor.cjs +0 -7
- package/cjs/refractor/visitors/json-schema/link-description/TemplateRequiredVisitor.cjs +0 -7
- package/es/refractor/visitors/json-schema/$commentVisitor.mjs +0 -3
- package/es/refractor/visitors/json-schema/ContentEncodingVisitor.mjs +0 -3
- package/es/refractor/visitors/json-schema/ContentMediaTypeVisitor.mjs +0 -3
- package/es/refractor/visitors/json-schema/WriteOnlyVisitor.mjs +0 -3
- package/es/refractor/visitors/json-schema/link-description/$commentVisitor.mjs +0 -3
- package/es/refractor/visitors/json-schema/link-description/AnchorPointerVisitor.mjs +0 -3
- package/es/refractor/visitors/json-schema/link-description/AnchorVisitor.mjs +0 -3
- package/es/refractor/visitors/json-schema/link-description/DescriptionVisitor.mjs +0 -3
- package/es/refractor/visitors/json-schema/link-description/SubmissionMediaTypeVisitor.mjs +0 -3
- package/es/refractor/visitors/json-schema/link-description/TargetHintsVisitor.mjs +0 -3
- package/es/refractor/visitors/json-schema/link-description/TargetMediaTypeVisitor.mjs +0 -3
- package/es/refractor/visitors/json-schema/link-description/TemplatePointersVisitor.mjs +0 -3
- package/es/refractor/visitors/json-schema/link-description/TemplateRequiredVisitor.mjs +0 -3
package/es/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ export { default as refractorPluginReplaceEmptyElement } from "./refractor/plugi
|
|
|
5
5
|
export { default as refract, createRefractor } from "./refractor/index.mjs";
|
|
6
6
|
export { default as specificationObj } from "./refractor/specification.mjs";
|
|
7
7
|
export { isJSONReferenceElement, isJSONSchemaElement, isLinkDescriptionElement } from "./predicates.mjs";
|
|
8
|
-
export { isJSONReferenceLikeElement, SpecificationVisitor, FallbackVisitor, FixedFieldsVisitor, PatternedFieldsVisitor, MapVisitor, AlternatingVisitor, ParentSchemaAwareVisitor } from '@swagger-api/apidom-ns-json-schema-draft-6';
|
|
8
|
+
export { isJSONReferenceLikeElement, SpecificationVisitor, FallbackVisitor, FixedFieldsVisitor, PatternedFieldsVisitor, MapVisitor, AlternatingVisitor, ParentSchemaAwareVisitor, Visitor } from '@swagger-api/apidom-ns-json-schema-draft-6';
|
|
9
9
|
export { keyMap, getNodeType } from "./traversal/visitor.mjs";
|
|
10
10
|
/**
|
|
11
11
|
* JSON Schema Draft 7 specification elements.
|
package/es/refractor/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { path } from 'ramda';
|
|
2
2
|
import { visit, dereference, refract as baseRefract, dispatchRefractorPlugins } from '@swagger-api/apidom-core';
|
|
3
3
|
import specification from "./specification.mjs";
|
|
4
4
|
import { keyMap, getNodeType } from "../traversal/visitor.mjs";
|
|
@@ -16,13 +16,11 @@ const refract = (value, {
|
|
|
16
16
|
* We don't allow consumers to hook into this translation.
|
|
17
17
|
* Though we allow consumers to define their onw plugins on already transformed ApiDOM.
|
|
18
18
|
*/
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
state: {
|
|
23
|
-
specObj: resolvedSpec
|
|
24
|
-
}
|
|
19
|
+
const RootVisitorClass = path(specPath, resolvedSpec);
|
|
20
|
+
const rootVisitor = new RootVisitorClass({
|
|
21
|
+
specObj: resolvedSpec
|
|
25
22
|
});
|
|
23
|
+
visit(element, rootVisitor);
|
|
26
24
|
|
|
27
25
|
/**
|
|
28
26
|
* Run plugins only when necessary.
|
|
@@ -1,21 +1,10 @@
|
|
|
1
1
|
import { pipe, assocPath, dissocPath } from 'ramda';
|
|
2
2
|
import { specificationObj } from '@swagger-api/apidom-ns-json-schema-draft-6';
|
|
3
3
|
import JSONSchemaVisitor from "./visitors/json-schema/index.mjs";
|
|
4
|
-
import JSONSchema$commentVisitor from "./visitors/json-schema/$commentVisitor.mjs";
|
|
5
|
-
import JsonSchemaContentEncodingVisitor from "./visitors/json-schema/ContentEncodingVisitor.mjs";
|
|
6
|
-
import JsonSchemaContentMediaTypeVisitor from "./visitors/json-schema/ContentMediaTypeVisitor.mjs";
|
|
7
|
-
import JsonSchemaWriteOnlyVisitor from "./visitors/json-schema/WriteOnlyVisitor.mjs";
|
|
8
4
|
import LinkDescriptionVisitor from "./visitors/json-schema/link-description/index.mjs";
|
|
9
|
-
import LinkDescriptionAnchorVisitor from "./visitors/json-schema/link-description/AnchorVisitor.mjs";
|
|
10
|
-
import LinkDescriptionAnchorPointerVisitor from "./visitors/json-schema/link-description/AnchorPointerVisitor.mjs";
|
|
11
|
-
import LinkDescriptionTargetMediaTypeVisitor from "./visitors/json-schema/link-description/TargetMediaTypeVisitor.mjs";
|
|
12
|
-
import LinkDescriptionTargetHintsVisitor from "./visitors/json-schema/link-description/TargetHintsVisitor.mjs";
|
|
13
|
-
import LinkDescriptionDescriptionVisitor from "./visitors/json-schema/link-description/DescriptionVisitor.mjs";
|
|
14
|
-
import LinkDescription$commentVisitor from "./visitors/json-schema/link-description/$commentVisitor.mjs";
|
|
15
|
-
import LinkDescriptionSubmissionMediaTypeVisitor from "./visitors/json-schema/link-description/SubmissionMediaTypeVisitor.mjs";
|
|
16
5
|
const specification = pipe(
|
|
17
6
|
// JSON Schema object modifications
|
|
18
|
-
assocPath(['visitors', 'document', 'objects', 'JSONSchema', '$visitor'], JSONSchemaVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', '$comment'],
|
|
7
|
+
assocPath(['visitors', 'document', 'objects', 'JSONSchema', '$visitor'], JSONSchemaVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', '$comment'], specificationObj.visitors.value), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'if'], specificationObj.visitors.JSONSchemaOrJSONReferenceVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'then'], specificationObj.visitors.JSONSchemaOrJSONReferenceVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'else'], specificationObj.visitors.JSONSchemaOrJSONReferenceVisitor), dissocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'media']), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'contentEncoding'], specificationObj.visitors.value), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'contentMediaType'], specificationObj.visitors.value), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'writeOnly'], specificationObj.visitors.value),
|
|
19
8
|
// Link Description object modifications
|
|
20
|
-
assocPath(['visitors', 'document', 'objects', 'LinkDescription', '$visitor'], LinkDescriptionVisitor), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'anchor'],
|
|
9
|
+
assocPath(['visitors', 'document', 'objects', 'LinkDescription', '$visitor'], LinkDescriptionVisitor), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'anchor'], specificationObj.visitors.value), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'anchorPointer'], specificationObj.visitors.value), dissocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'mediaType']), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'targetMediaType'], specificationObj.visitors.value), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'targetHints'], specificationObj.visitors.value), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'description'], specificationObj.visitors.value), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', '$comment'], specificationObj.visitors.value), dissocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'submissionEncType']), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'submissionMediaType'], specificationObj.visitors.value))(specificationObj);
|
|
21
10
|
export default specification;
|
|
@@ -1,24 +1,20 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Mixin } from 'ts-mixer';
|
|
2
2
|
import { always } from 'ramda';
|
|
3
|
-
import { BREAK, cloneDeep } from '@swagger-api/apidom-core';
|
|
4
3
|
import { FixedFieldsVisitor, FallbackVisitor } from '@swagger-api/apidom-ns-json-schema-draft-6';
|
|
5
4
|
import JSONSchemaElement from "../../../elements/JSONSchema.mjs";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
methods: {
|
|
11
|
-
ObjectElement(objectElement) {
|
|
12
|
-
this.element = new JSONSchemaElement();
|
|
13
|
-
|
|
14
|
-
// @ts-ignore
|
|
15
|
-
return FixedFieldsVisitor.compose.methods.ObjectElement.call(this, objectElement);
|
|
16
|
-
},
|
|
17
|
-
BooleanElement(booleanElement) {
|
|
18
|
-
this.element = cloneDeep(booleanElement);
|
|
19
|
-
this.element.classes.push('boolean-json-schema');
|
|
20
|
-
return BREAK;
|
|
21
|
-
}
|
|
5
|
+
class JSONSchemaVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) {
|
|
6
|
+
constructor(options) {
|
|
7
|
+
super(options);
|
|
8
|
+
this.specPath = always(['document', 'objects', 'JSONSchema']);
|
|
22
9
|
}
|
|
23
|
-
|
|
10
|
+
ObjectElement(objectElement) {
|
|
11
|
+
this.element = new JSONSchemaElement();
|
|
12
|
+
return FixedFieldsVisitor.prototype.ObjectElement.call(this, objectElement);
|
|
13
|
+
}
|
|
14
|
+
BooleanElement(booleanElement) {
|
|
15
|
+
const result = this.enter(booleanElement);
|
|
16
|
+
this.element.classes.push('boolean-json-schema');
|
|
17
|
+
return result;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
24
20
|
export default JSONSchemaVisitor;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Mixin } from 'ts-mixer';
|
|
2
2
|
import { always } from 'ramda';
|
|
3
3
|
import { FixedFieldsVisitor, FallbackVisitor } from '@swagger-api/apidom-ns-json-schema-draft-6';
|
|
4
4
|
import LinkDescriptionElement from "../../../../elements/LinkDescription.mjs";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
},
|
|
9
|
-
init() {
|
|
5
|
+
class LinkDescriptionVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) {
|
|
6
|
+
constructor(options) {
|
|
7
|
+
super(options);
|
|
10
8
|
this.element = new LinkDescriptionElement();
|
|
9
|
+
this.specPath = always(['document', 'objects', 'LinkDescription']);
|
|
11
10
|
}
|
|
12
|
-
}
|
|
11
|
+
}
|
|
13
12
|
export default LinkDescriptionVisitor;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swagger-api/apidom-ns-json-schema-draft-7",
|
|
3
|
-
"version": "0.99.
|
|
3
|
+
"version": "0.99.2",
|
|
4
4
|
"description": "JSON Schema Draft 7 namespace for ApiDOM.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
"license": "Apache-2.0",
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@babel/runtime-corejs3": "^7.20.7",
|
|
45
|
-
"@swagger-api/apidom-core": "^0.99.
|
|
45
|
+
"@swagger-api/apidom-core": "^0.99.2",
|
|
46
46
|
"@swagger-api/apidom-error": "^0.99.0",
|
|
47
|
-
"@swagger-api/apidom-ns-json-schema-draft-6": "^0.99.
|
|
47
|
+
"@swagger-api/apidom-ns-json-schema-draft-6": "^0.99.2",
|
|
48
48
|
"@types/ramda": "~0.29.6",
|
|
49
|
-
"ramda": "~0.
|
|
50
|
-
"ramda-adjunct": "^
|
|
51
|
-
"
|
|
49
|
+
"ramda": "~0.30.0",
|
|
50
|
+
"ramda-adjunct": "^5.0.0",
|
|
51
|
+
"ts-mixer": "^6.0.4"
|
|
52
52
|
},
|
|
53
53
|
"files": [
|
|
54
54
|
"cjs/",
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"README.md",
|
|
61
61
|
"CHANGELOG.md"
|
|
62
62
|
],
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "6080f63b5e18283c10dcebc5ec6087552a3e1d4f"
|
|
64
64
|
}
|
package/types/dist.d.ts
CHANGED
|
@@ -3,9 +3,10 @@ import * as _swagger_api_apidom_core from '@swagger-api/apidom-core';
|
|
|
3
3
|
import { MediaTypes, NamespacePluginOptions, StringElement, Element, Meta, Attributes, BooleanElement, ObjectElement, ArrayElement } from '@swagger-api/apidom-core';
|
|
4
4
|
export { isArrayElement, isBooleanElement, isElement, isLinkElement, isMemberElement, isNullElement, isNumberElement, isObjectElement, isRefElement, isStringElement } from '@swagger-api/apidom-core';
|
|
5
5
|
import * as minim from 'minim';
|
|
6
|
-
import * as
|
|
7
|
-
import { JSONSchemaElement, JSONReferenceElement, MediaElement, LinkDescriptionElement } from '@swagger-api/apidom-ns-json-schema-draft-6';
|
|
8
|
-
export { AlternatingVisitor, FallbackVisitor, FixedFieldsVisitor, JSONReferenceElement, MapVisitor, ParentSchemaAwareVisitor, PatternedFieldsVisitor, SpecificationVisitor, isJSONReferenceElement, isJSONReferenceLikeElement } from '@swagger-api/apidom-ns-json-schema-draft-6';
|
|
6
|
+
import * as _swagger_api_apidom_ns_json_schema_draft_4 from '@swagger-api/apidom-ns-json-schema-draft-4';
|
|
7
|
+
import { JSONSchemaElement, JSONReferenceElement, MediaElement, LinkDescriptionElement, FixedFieldsVisitorOptions, FallbackVisitorOptions, SpecPath, FixedFieldsVisitor, FallbackVisitor } from '@swagger-api/apidom-ns-json-schema-draft-6';
|
|
8
|
+
export { AllOfVisitorOptions, AlternatingVisitor, AlternatingVisitorOptions, AnyOfVisitorOptions, DefinitionsVisitorOptions, DependenciesVisitorOptions, FallbackVisitor, FallbackVisitorOptions, FixedFieldsVisitor, FixedFieldsVisitorOptions, ItemsVisitorOptions, JSONReferenceElement, MapVisitor, MapVisitorOptions, OneOfVisitorOptions, ParentSchemaAwareVisitor, ParentSchemaAwareVisitorOptions, PatternPropertiesVisitorOptions, PatternedFieldsVisitor, PatternedFieldsVisitorOptions, PropertiesVisitorOptions, SchemaOrReferenceVisitorOptions, SpecPath, SpecificationVisitor, SpecificationVisitorOptions, Visitor, VisitorOptions, isJSONReferenceElement, isJSONReferenceLikeElement } from '@swagger-api/apidom-ns-json-schema-draft-6';
|
|
9
|
+
import * as ts_mixer_dist_types_types from 'ts-mixer/dist/types/types';
|
|
9
10
|
|
|
10
11
|
type Format = 'generic' | 'json' | 'yaml';
|
|
11
12
|
declare class JSONSchemaDraft7MediaTypes extends MediaTypes<string> {
|
|
@@ -25,83 +26,141 @@ declare const plugin: () => () => {
|
|
|
25
26
|
};
|
|
26
27
|
};
|
|
27
28
|
|
|
28
|
-
declare const refract: <T extends Element>(value:
|
|
29
|
+
declare const refract: <T extends Element>(value: unknown, { specPath, plugins, specificationObj, }?: {
|
|
29
30
|
specPath?: string[] | undefined;
|
|
30
31
|
plugins?: never[] | undefined;
|
|
31
32
|
specificationObj?: {
|
|
32
33
|
visitors: {
|
|
33
|
-
value:
|
|
34
|
-
JSONSchemaOrJSONReferenceVisitor:
|
|
34
|
+
value: typeof _swagger_api_apidom_ns_json_schema_draft_4.FallbackVisitor;
|
|
35
|
+
JSONSchemaOrJSONReferenceVisitor: typeof _swagger_api_apidom_ns_json_schema_draft_4.SchemaOrReferenceVisitor;
|
|
35
36
|
document: {
|
|
36
37
|
objects: {
|
|
37
38
|
JSONSchema: {
|
|
38
|
-
$visitor:
|
|
39
|
+
$visitor: typeof _swagger_api_apidom_ns_json_schema_draft_4.JSONSchemaVisitor;
|
|
39
40
|
fixedFields: {
|
|
40
|
-
id:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
41
|
+
id: {
|
|
42
|
+
$ref: string;
|
|
43
|
+
};
|
|
44
|
+
$schema: {
|
|
45
|
+
$ref: string;
|
|
46
|
+
};
|
|
47
|
+
multipleOf: {
|
|
48
|
+
$ref: string;
|
|
49
|
+
};
|
|
50
|
+
maximum: {
|
|
51
|
+
$ref: string;
|
|
52
|
+
};
|
|
53
|
+
exclusiveMaximum: {
|
|
54
|
+
$ref: string;
|
|
55
|
+
};
|
|
56
|
+
minimum: {
|
|
57
|
+
$ref: string;
|
|
58
|
+
};
|
|
59
|
+
exclusiveMinimum: {
|
|
60
|
+
$ref: string;
|
|
61
|
+
};
|
|
62
|
+
maxLength: {
|
|
63
|
+
$ref: string;
|
|
64
|
+
};
|
|
65
|
+
minLength: {
|
|
66
|
+
$ref: string;
|
|
67
|
+
};
|
|
68
|
+
pattern: {
|
|
69
|
+
$ref: string;
|
|
70
|
+
};
|
|
71
|
+
additionalItems: typeof _swagger_api_apidom_ns_json_schema_draft_4.SchemaOrReferenceVisitor;
|
|
72
|
+
items: typeof _swagger_api_apidom_ns_json_schema_draft_4.ItemsVisitor;
|
|
73
|
+
maxItems: {
|
|
74
|
+
$ref: string;
|
|
75
|
+
};
|
|
76
|
+
minItems: {
|
|
77
|
+
$ref: string;
|
|
78
|
+
};
|
|
79
|
+
uniqueItems: {
|
|
80
|
+
$ref: string;
|
|
81
|
+
};
|
|
82
|
+
maxProperties: {
|
|
83
|
+
$ref: string;
|
|
84
|
+
};
|
|
85
|
+
minProperties: {
|
|
86
|
+
$ref: string;
|
|
87
|
+
};
|
|
88
|
+
required: typeof _swagger_api_apidom_ns_json_schema_draft_4.RequiredVisitor;
|
|
89
|
+
properties: typeof _swagger_api_apidom_ns_json_schema_draft_4.PropertiesVisitor;
|
|
90
|
+
additionalProperties: typeof _swagger_api_apidom_ns_json_schema_draft_4.SchemaOrReferenceVisitor;
|
|
91
|
+
patternProperties: typeof _swagger_api_apidom_ns_json_schema_draft_4.PatternPropertiesVisitor;
|
|
92
|
+
dependencies: typeof _swagger_api_apidom_ns_json_schema_draft_4.DependenciesVisitor;
|
|
93
|
+
enum: typeof _swagger_api_apidom_ns_json_schema_draft_4.EnumVisitor;
|
|
94
|
+
type: typeof _swagger_api_apidom_ns_json_schema_draft_4.TypeVisitor;
|
|
95
|
+
allOf: typeof _swagger_api_apidom_ns_json_schema_draft_4.AllOfVisitor;
|
|
96
|
+
anyOf: typeof _swagger_api_apidom_ns_json_schema_draft_4.AnyOfVisitor;
|
|
97
|
+
oneOf: typeof _swagger_api_apidom_ns_json_schema_draft_4.OneOfVisitor;
|
|
98
|
+
not: typeof _swagger_api_apidom_ns_json_schema_draft_4.SchemaOrReferenceVisitor;
|
|
99
|
+
definitions: typeof _swagger_api_apidom_ns_json_schema_draft_4.DefinitionsVisitor;
|
|
100
|
+
title: {
|
|
101
|
+
$ref: string;
|
|
102
|
+
};
|
|
103
|
+
description: {
|
|
104
|
+
$ref: string;
|
|
105
|
+
};
|
|
106
|
+
default: {
|
|
107
|
+
$ref: string;
|
|
108
|
+
};
|
|
109
|
+
format: {
|
|
110
|
+
$ref: string;
|
|
111
|
+
};
|
|
112
|
+
base: {
|
|
113
|
+
$ref: string;
|
|
114
|
+
};
|
|
115
|
+
links: typeof _swagger_api_apidom_ns_json_schema_draft_4.LinksVisitor;
|
|
75
116
|
media: {
|
|
76
117
|
$ref: string;
|
|
77
118
|
};
|
|
78
|
-
readOnly:
|
|
119
|
+
readOnly: {
|
|
120
|
+
$ref: string;
|
|
121
|
+
};
|
|
79
122
|
};
|
|
80
123
|
};
|
|
81
124
|
JSONReference: {
|
|
82
|
-
$visitor:
|
|
125
|
+
$visitor: typeof _swagger_api_apidom_ns_json_schema_draft_4.JSONReferenceVisitor;
|
|
83
126
|
fixedFields: {
|
|
84
|
-
$ref:
|
|
127
|
+
$ref: typeof _swagger_api_apidom_ns_json_schema_draft_4.JSONReference$RefVisitor;
|
|
85
128
|
};
|
|
86
129
|
};
|
|
87
130
|
Media: {
|
|
88
|
-
$visitor:
|
|
131
|
+
$visitor: typeof _swagger_api_apidom_ns_json_schema_draft_4.MediaVisitor;
|
|
89
132
|
fixedFields: {
|
|
90
|
-
binaryEncoding:
|
|
91
|
-
|
|
133
|
+
binaryEncoding: {
|
|
134
|
+
$ref: string;
|
|
135
|
+
};
|
|
136
|
+
type: {
|
|
137
|
+
$ref: string;
|
|
138
|
+
};
|
|
92
139
|
};
|
|
93
140
|
};
|
|
94
141
|
LinkDescription: {
|
|
95
|
-
$visitor:
|
|
142
|
+
$visitor: typeof _swagger_api_apidom_ns_json_schema_draft_4.LinkDescriptionVisitor;
|
|
96
143
|
fixedFields: {
|
|
97
|
-
href:
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
144
|
+
href: {
|
|
145
|
+
$ref: string;
|
|
146
|
+
};
|
|
147
|
+
rel: {
|
|
148
|
+
$ref: string;
|
|
149
|
+
};
|
|
150
|
+
title: {
|
|
151
|
+
$ref: string;
|
|
152
|
+
};
|
|
153
|
+
targetSchema: typeof _swagger_api_apidom_ns_json_schema_draft_4.SchemaOrReferenceVisitor;
|
|
154
|
+
mediaType: {
|
|
155
|
+
$ref: string;
|
|
156
|
+
};
|
|
157
|
+
method: {
|
|
158
|
+
$ref: string;
|
|
159
|
+
};
|
|
160
|
+
encType: {
|
|
161
|
+
$ref: string;
|
|
162
|
+
};
|
|
163
|
+
schema: typeof _swagger_api_apidom_ns_json_schema_draft_4.SchemaOrReferenceVisitor;
|
|
105
164
|
};
|
|
106
165
|
};
|
|
107
166
|
};
|
|
@@ -109,82 +168,140 @@ declare const refract: <T extends Element>(value: any, { specPath, plugins, spec
|
|
|
109
168
|
};
|
|
110
169
|
} | undefined;
|
|
111
170
|
}) => T;
|
|
112
|
-
declare const createRefractor: (specPath: string[]) => (value:
|
|
171
|
+
declare const createRefractor: (specPath: string[]) => (value: unknown, options?: {}) => Element;
|
|
113
172
|
|
|
114
173
|
declare const _default: {
|
|
115
174
|
visitors: {
|
|
116
|
-
value:
|
|
117
|
-
JSONSchemaOrJSONReferenceVisitor:
|
|
175
|
+
value: typeof _swagger_api_apidom_ns_json_schema_draft_4.FallbackVisitor;
|
|
176
|
+
JSONSchemaOrJSONReferenceVisitor: typeof _swagger_api_apidom_ns_json_schema_draft_4.SchemaOrReferenceVisitor;
|
|
118
177
|
document: {
|
|
119
178
|
objects: {
|
|
120
179
|
JSONSchema: {
|
|
121
|
-
$visitor:
|
|
180
|
+
$visitor: typeof _swagger_api_apidom_ns_json_schema_draft_4.JSONSchemaVisitor;
|
|
122
181
|
fixedFields: {
|
|
123
|
-
id:
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
182
|
+
id: {
|
|
183
|
+
$ref: string;
|
|
184
|
+
};
|
|
185
|
+
$schema: {
|
|
186
|
+
$ref: string;
|
|
187
|
+
};
|
|
188
|
+
multipleOf: {
|
|
189
|
+
$ref: string;
|
|
190
|
+
};
|
|
191
|
+
maximum: {
|
|
192
|
+
$ref: string;
|
|
193
|
+
};
|
|
194
|
+
exclusiveMaximum: {
|
|
195
|
+
$ref: string;
|
|
196
|
+
};
|
|
197
|
+
minimum: {
|
|
198
|
+
$ref: string;
|
|
199
|
+
};
|
|
200
|
+
exclusiveMinimum: {
|
|
201
|
+
$ref: string;
|
|
202
|
+
};
|
|
203
|
+
maxLength: {
|
|
204
|
+
$ref: string;
|
|
205
|
+
};
|
|
206
|
+
minLength: {
|
|
207
|
+
$ref: string;
|
|
208
|
+
};
|
|
209
|
+
pattern: {
|
|
210
|
+
$ref: string;
|
|
211
|
+
};
|
|
212
|
+
additionalItems: typeof _swagger_api_apidom_ns_json_schema_draft_4.SchemaOrReferenceVisitor;
|
|
213
|
+
items: typeof _swagger_api_apidom_ns_json_schema_draft_4.ItemsVisitor;
|
|
214
|
+
maxItems: {
|
|
215
|
+
$ref: string;
|
|
216
|
+
};
|
|
217
|
+
minItems: {
|
|
218
|
+
$ref: string;
|
|
219
|
+
};
|
|
220
|
+
uniqueItems: {
|
|
221
|
+
$ref: string;
|
|
222
|
+
};
|
|
223
|
+
maxProperties: {
|
|
224
|
+
$ref: string;
|
|
225
|
+
};
|
|
226
|
+
minProperties: {
|
|
227
|
+
$ref: string;
|
|
228
|
+
};
|
|
229
|
+
required: typeof _swagger_api_apidom_ns_json_schema_draft_4.RequiredVisitor;
|
|
230
|
+
properties: typeof _swagger_api_apidom_ns_json_schema_draft_4.PropertiesVisitor;
|
|
231
|
+
additionalProperties: typeof _swagger_api_apidom_ns_json_schema_draft_4.SchemaOrReferenceVisitor;
|
|
232
|
+
patternProperties: typeof _swagger_api_apidom_ns_json_schema_draft_4.PatternPropertiesVisitor;
|
|
233
|
+
dependencies: typeof _swagger_api_apidom_ns_json_schema_draft_4.DependenciesVisitor;
|
|
234
|
+
enum: typeof _swagger_api_apidom_ns_json_schema_draft_4.EnumVisitor;
|
|
235
|
+
type: typeof _swagger_api_apidom_ns_json_schema_draft_4.TypeVisitor;
|
|
236
|
+
allOf: typeof _swagger_api_apidom_ns_json_schema_draft_4.AllOfVisitor;
|
|
237
|
+
anyOf: typeof _swagger_api_apidom_ns_json_schema_draft_4.AnyOfVisitor;
|
|
238
|
+
oneOf: typeof _swagger_api_apidom_ns_json_schema_draft_4.OneOfVisitor;
|
|
239
|
+
not: typeof _swagger_api_apidom_ns_json_schema_draft_4.SchemaOrReferenceVisitor;
|
|
240
|
+
definitions: typeof _swagger_api_apidom_ns_json_schema_draft_4.DefinitionsVisitor;
|
|
241
|
+
title: {
|
|
242
|
+
$ref: string;
|
|
243
|
+
};
|
|
244
|
+
description: {
|
|
245
|
+
$ref: string;
|
|
246
|
+
};
|
|
247
|
+
default: {
|
|
248
|
+
$ref: string;
|
|
249
|
+
};
|
|
250
|
+
format: {
|
|
251
|
+
$ref: string;
|
|
252
|
+
};
|
|
253
|
+
base: {
|
|
254
|
+
$ref: string;
|
|
255
|
+
};
|
|
256
|
+
links: typeof _swagger_api_apidom_ns_json_schema_draft_4.LinksVisitor;
|
|
158
257
|
media: {
|
|
159
258
|
$ref: string;
|
|
160
259
|
};
|
|
161
|
-
readOnly:
|
|
260
|
+
readOnly: {
|
|
261
|
+
$ref: string;
|
|
262
|
+
};
|
|
162
263
|
};
|
|
163
264
|
};
|
|
164
265
|
JSONReference: {
|
|
165
|
-
$visitor:
|
|
266
|
+
$visitor: typeof _swagger_api_apidom_ns_json_schema_draft_4.JSONReferenceVisitor;
|
|
166
267
|
fixedFields: {
|
|
167
|
-
$ref:
|
|
268
|
+
$ref: typeof _swagger_api_apidom_ns_json_schema_draft_4.JSONReference$RefVisitor;
|
|
168
269
|
};
|
|
169
270
|
};
|
|
170
271
|
Media: {
|
|
171
|
-
$visitor:
|
|
272
|
+
$visitor: typeof _swagger_api_apidom_ns_json_schema_draft_4.MediaVisitor;
|
|
172
273
|
fixedFields: {
|
|
173
|
-
binaryEncoding:
|
|
174
|
-
|
|
274
|
+
binaryEncoding: {
|
|
275
|
+
$ref: string;
|
|
276
|
+
};
|
|
277
|
+
type: {
|
|
278
|
+
$ref: string;
|
|
279
|
+
};
|
|
175
280
|
};
|
|
176
281
|
};
|
|
177
282
|
LinkDescription: {
|
|
178
|
-
$visitor:
|
|
283
|
+
$visitor: typeof _swagger_api_apidom_ns_json_schema_draft_4.LinkDescriptionVisitor;
|
|
179
284
|
fixedFields: {
|
|
180
|
-
href:
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
285
|
+
href: {
|
|
286
|
+
$ref: string;
|
|
287
|
+
};
|
|
288
|
+
rel: {
|
|
289
|
+
$ref: string;
|
|
290
|
+
};
|
|
291
|
+
title: {
|
|
292
|
+
$ref: string;
|
|
293
|
+
};
|
|
294
|
+
targetSchema: typeof _swagger_api_apidom_ns_json_schema_draft_4.SchemaOrReferenceVisitor;
|
|
295
|
+
mediaType: {
|
|
296
|
+
$ref: string;
|
|
297
|
+
};
|
|
298
|
+
method: {
|
|
299
|
+
$ref: string;
|
|
300
|
+
};
|
|
301
|
+
encType: {
|
|
302
|
+
$ref: string;
|
|
303
|
+
};
|
|
304
|
+
schema: typeof _swagger_api_apidom_ns_json_schema_draft_4.SchemaOrReferenceVisitor;
|
|
188
305
|
};
|
|
189
306
|
};
|
|
190
307
|
};
|
|
@@ -288,6 +405,26 @@ declare class LinkDescription extends LinkDescriptionElement {
|
|
|
288
405
|
declare const isJSONSchemaElement: _swagger_api_apidom_core.ElementPredicate<JSONSchema>;
|
|
289
406
|
declare const isLinkDescriptionElement: _swagger_api_apidom_core.ElementPredicate<LinkDescription>;
|
|
290
407
|
|
|
408
|
+
interface JSONSchemaVisitorOptions extends FixedFieldsVisitorOptions, FallbackVisitorOptions {
|
|
409
|
+
}
|
|
410
|
+
declare const JSONSchemaVisitor_base: ts_mixer_dist_types_types.Class<any[], FixedFieldsVisitor & FallbackVisitor, typeof FixedFieldsVisitor & typeof FallbackVisitor>;
|
|
411
|
+
declare class JSONSchemaVisitor extends JSONSchemaVisitor_base {
|
|
412
|
+
element: JSONSchema;
|
|
413
|
+
protected readonly specPath: SpecPath<['document', 'objects', 'JSONSchema']>;
|
|
414
|
+
constructor(options: JSONSchemaVisitorOptions);
|
|
415
|
+
ObjectElement(objectElement: ObjectElement): {};
|
|
416
|
+
BooleanElement(booleanElement: BooleanElement): {};
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
interface LinkDescriptionVisitorOptions extends FixedFieldsVisitorOptions, FallbackVisitorOptions {
|
|
420
|
+
}
|
|
421
|
+
declare const LinkDescriptionVisitor_base: ts_mixer_dist_types_types.Class<any[], FixedFieldsVisitor & FallbackVisitor, typeof FixedFieldsVisitor & typeof FallbackVisitor>;
|
|
422
|
+
declare class LinkDescriptionVisitor extends LinkDescriptionVisitor_base {
|
|
423
|
+
readonly element: LinkDescription;
|
|
424
|
+
protected readonly specPath: SpecPath<['document', 'objects', 'LinkDescription']>;
|
|
425
|
+
constructor(options: LinkDescriptionVisitorOptions);
|
|
426
|
+
}
|
|
427
|
+
|
|
291
428
|
declare const getNodeType: <T extends Element>(element: T) => string | undefined;
|
|
292
429
|
declare const keyMap: {
|
|
293
430
|
ObjectElement: string[];
|
|
@@ -308,4 +445,4 @@ declare const keyMap: {
|
|
|
308
445
|
LinkDescriptionElement: string[];
|
|
309
446
|
};
|
|
310
447
|
|
|
311
|
-
export { JSONSchemaDraft7MediaTypes, JSONSchema as JSONSchemaElement, LinkDescription as LinkDescriptionElement, createRefractor, jsonSchemaDraft7 as default, getNodeType, isJSONSchemaElement, isLinkDescriptionElement, keyMap, mediaTypes, refract, plugin as refractorPluginReplaceEmptyElement, _default as specificationObj };
|
|
448
|
+
export { JSONSchemaDraft7MediaTypes, JSONSchema as JSONSchemaElement, JSONSchemaVisitor, type JSONSchemaVisitorOptions, LinkDescription as LinkDescriptionElement, LinkDescriptionVisitor, type LinkDescriptionVisitorOptions, createRefractor, jsonSchemaDraft7 as default, getNodeType, isJSONSchemaElement, isLinkDescriptionElement, keyMap, mediaTypes, refract, plugin as refractorPluginReplaceEmptyElement, _default as specificationObj };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.default = void 0;
|
|
5
|
-
var _apidomNsJsonSchemaDraft = require("@swagger-api/apidom-ns-json-schema-draft-6");
|
|
6
|
-
const $commentVisitor = _apidomNsJsonSchemaDraft.FallbackVisitor;
|
|
7
|
-
var _default = exports.default = $commentVisitor;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.default = void 0;
|
|
5
|
-
var _apidomNsJsonSchemaDraft = require("@swagger-api/apidom-ns-json-schema-draft-6");
|
|
6
|
-
const ContentEncodingVisitor = _apidomNsJsonSchemaDraft.FallbackVisitor;
|
|
7
|
-
var _default = exports.default = ContentEncodingVisitor;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.default = void 0;
|
|
5
|
-
var _apidomNsJsonSchemaDraft = require("@swagger-api/apidom-ns-json-schema-draft-6");
|
|
6
|
-
const ContentMediaTypeVisitor = _apidomNsJsonSchemaDraft.FallbackVisitor;
|
|
7
|
-
var _default = exports.default = ContentMediaTypeVisitor;
|