@speclynx/apidom-ns-openapi-3-1 4.0.3 → 4.0.5
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 -0
- package/dist/apidom-ns-openapi-3-1.browser.js +34 -10
- package/dist/apidom-ns-openapi-3-1.browser.min.js +1 -1
- package/package.json +10 -9
- package/src/elements/Callback.ts +0 -8
- package/src/elements/Components.ts +0 -17
- package/src/elements/Contact.ts +0 -8
- package/src/elements/Discriminator.ts +0 -8
- package/src/elements/Encoding.ts +0 -8
- package/src/elements/Example.ts +0 -8
- package/src/elements/ExternalDocumentation.ts +0 -8
- package/src/elements/Header.ts +0 -18
- package/src/elements/Info.ts +0 -27
- package/src/elements/JsonSchemaDialect.ts +0 -15
- package/src/elements/License.ts +0 -17
- package/src/elements/Link.ts +0 -8
- package/src/elements/MediaType.ts +0 -18
- package/src/elements/OAuthFlow.ts +0 -8
- package/src/elements/OAuthFlows.ts +0 -8
- package/src/elements/OpenApi3-1.ts +0 -107
- package/src/elements/Openapi.ts +0 -8
- package/src/elements/Operation.ts +0 -19
- package/src/elements/Parameter.ts +0 -18
- package/src/elements/PathItem.ts +0 -74
- package/src/elements/Paths.ts +0 -8
- package/src/elements/Reference.ts +0 -29
- package/src/elements/RequestBody.ts +0 -8
- package/src/elements/Response.ts +0 -8
- package/src/elements/Responses.ts +0 -8
- package/src/elements/Schema.ts +0 -59
- package/src/elements/SecurityRequirement.ts +0 -8
- package/src/elements/SecurityScheme.ts +0 -8
- package/src/elements/Server.ts +0 -8
- package/src/elements/ServerVariable.ts +0 -8
- package/src/elements/Tag.ts +0 -8
- package/src/elements/Xml.ts +0 -8
- package/src/elements/nces/ComponentsPathItems.ts +0 -15
- package/src/elements/nces/Webhooks.ts +0 -15
- package/src/index.ts +0 -592
- package/src/media-types.ts +0 -46
- package/src/namespace.ts +0 -80
- package/src/predicates.ts +0 -229
- package/src/refractor/index.ts +0 -380
- package/src/refractor/inspect.ts +0 -241
- package/src/refractor/plugins/normalize-header-examples/NormalizeStorage.ts +0 -53
- package/src/refractor/plugins/normalize-header-examples/index.ts +0 -125
- package/src/refractor/plugins/normalize-operation-ids.ts +0 -198
- package/src/refractor/plugins/normalize-parameter-examples.ts +0 -128
- package/src/refractor/plugins/normalize-parameters.ts +0 -136
- package/src/refractor/plugins/normalize-security-requirements.ts +0 -87
- package/src/refractor/plugins/normalize-servers.ts +0 -144
- package/src/refractor/plugins/replace-empty-element.ts +0 -726
- package/src/refractor/predicates.ts +0 -39
- package/src/refractor/specification.ts +0 -594
- package/src/refractor/toolbox.ts +0 -70
- package/src/refractor/visitors/open-api-3-1/JsonSchemaDialectVisitor.ts +0 -32
- package/src/refractor/visitors/open-api-3-1/OpenapiVisitor.ts +0 -30
- package/src/refractor/visitors/open-api-3-1/WebhooksVisitor.ts +0 -57
- package/src/refractor/visitors/open-api-3-1/bases.ts +0 -66
- package/src/refractor/visitors/open-api-3-1/callback/index.ts +0 -56
- package/src/refractor/visitors/open-api-3-1/components/PathItemsVisitor.ts +0 -45
- package/src/refractor/visitors/open-api-3-1/components/SchemasVisitor.ts +0 -26
- package/src/refractor/visitors/open-api-3-1/components/index.ts +0 -29
- package/src/refractor/visitors/open-api-3-1/contact/index.ts +0 -29
- package/src/refractor/visitors/open-api-3-1/distriminator/index.ts +0 -32
- package/src/refractor/visitors/open-api-3-1/encoding/index.ts +0 -29
- package/src/refractor/visitors/open-api-3-1/example/index.ts +0 -29
- package/src/refractor/visitors/open-api-3-1/external-documentation/index.ts +0 -29
- package/src/refractor/visitors/open-api-3-1/header/index.ts +0 -29
- package/src/refractor/visitors/open-api-3-1/index.ts +0 -52
- package/src/refractor/visitors/open-api-3-1/info/index.ts +0 -29
- package/src/refractor/visitors/open-api-3-1/license/index.ts +0 -29
- package/src/refractor/visitors/open-api-3-1/link/index.ts +0 -29
- package/src/refractor/visitors/open-api-3-1/media-type/index.ts +0 -29
- package/src/refractor/visitors/open-api-3-1/oauth-flow/index.ts +0 -29
- package/src/refractor/visitors/open-api-3-1/oauth-flows/index.ts +0 -29
- package/src/refractor/visitors/open-api-3-1/operation/index.ts +0 -29
- package/src/refractor/visitors/open-api-3-1/parameter/index.ts +0 -29
- package/src/refractor/visitors/open-api-3-1/path-item/index.ts +0 -29
- package/src/refractor/visitors/open-api-3-1/paths/index.ts +0 -29
- package/src/refractor/visitors/open-api-3-1/reference/index.ts +0 -29
- package/src/refractor/visitors/open-api-3-1/request-body/index.ts +0 -29
- package/src/refractor/visitors/open-api-3-1/response/index.ts +0 -29
- package/src/refractor/visitors/open-api-3-1/responses/index.ts +0 -29
- package/src/refractor/visitors/open-api-3-1/schema/$defsVisitor.ts +0 -21
- package/src/refractor/visitors/open-api-3-1/schema/AllOfVisitor.ts +0 -18
- package/src/refractor/visitors/open-api-3-1/schema/AnyOfVisitor.ts +0 -18
- package/src/refractor/visitors/open-api-3-1/schema/DependentSchemasVisitor.ts +0 -18
- package/src/refractor/visitors/open-api-3-1/schema/OneOfVisitor.ts +0 -18
- package/src/refractor/visitors/open-api-3-1/schema/PatternPropertiesVisitor.ts +0 -18
- package/src/refractor/visitors/open-api-3-1/schema/PrefixItemsVisitor.ts +0 -18
- package/src/refractor/visitors/open-api-3-1/schema/PropertiesVisitor.ts +0 -18
- package/src/refractor/visitors/open-api-3-1/schema/index.ts +0 -88
- package/src/refractor/visitors/open-api-3-1/security-requirement/index.ts +0 -29
- package/src/refractor/visitors/open-api-3-1/security-scheme/index.ts +0 -29
- package/src/refractor/visitors/open-api-3-1/server/index.ts +0 -29
- package/src/refractor/visitors/open-api-3-1/server-variable/index.ts +0 -29
- package/src/refractor/visitors/open-api-3-1/tag/index.ts +0 -29
- package/src/refractor/visitors/open-api-3-1/xml/index.ts +0 -29
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
specificationObj as OpenApi3_1Specification,
|
|
3
|
-
LicenseVisitorOptions,
|
|
4
|
-
LicenseVisitor as LicenseVisitorType,
|
|
5
|
-
} from '@speclynx/apidom-ns-openapi-3-0';
|
|
6
|
-
|
|
7
|
-
import LicenseElement from '../../../../elements/License.ts';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @public
|
|
11
|
-
*/
|
|
12
|
-
export const BaseLicenseVisitor: typeof LicenseVisitorType =
|
|
13
|
-
OpenApi3_1Specification.visitors.document.objects.License.$visitor;
|
|
14
|
-
|
|
15
|
-
export type { LicenseVisitorOptions };
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* @public
|
|
19
|
-
*/
|
|
20
|
-
class LicenseVisitor extends BaseLicenseVisitor {
|
|
21
|
-
declare public readonly element: LicenseElement;
|
|
22
|
-
|
|
23
|
-
constructor(options: LicenseVisitorOptions) {
|
|
24
|
-
super(options);
|
|
25
|
-
this.element = new LicenseElement();
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export default LicenseVisitor;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
specificationObj as OpenApi3_1Specification,
|
|
3
|
-
LinkVisitorOptions,
|
|
4
|
-
LinkVisitor as LinkVisitorType,
|
|
5
|
-
} from '@speclynx/apidom-ns-openapi-3-0';
|
|
6
|
-
|
|
7
|
-
import LinkElement from '../../../../elements/Link.ts';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @public
|
|
11
|
-
*/
|
|
12
|
-
export const BaseLinkVisitor: typeof LinkVisitorType =
|
|
13
|
-
OpenApi3_1Specification.visitors.document.objects.Link.$visitor;
|
|
14
|
-
|
|
15
|
-
export type { LinkVisitorOptions };
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* @public
|
|
19
|
-
*/
|
|
20
|
-
class LinkVisitor extends BaseLinkVisitor {
|
|
21
|
-
declare public readonly element: LinkElement;
|
|
22
|
-
|
|
23
|
-
constructor(options: LinkVisitorOptions) {
|
|
24
|
-
super(options);
|
|
25
|
-
this.element = new LinkElement();
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export default LinkVisitor;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
specificationObj as OpenApi3_1Specification,
|
|
3
|
-
MediaTypeVisitorOptions,
|
|
4
|
-
MediaTypeVisitor as MediaTypeVisitorType,
|
|
5
|
-
} from '@speclynx/apidom-ns-openapi-3-0';
|
|
6
|
-
|
|
7
|
-
import MediaTypeElement from '../../../../elements/MediaType.ts';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @public
|
|
11
|
-
*/
|
|
12
|
-
export const BaseMediaTypeVisitor: typeof MediaTypeVisitorType =
|
|
13
|
-
OpenApi3_1Specification.visitors.document.objects.MediaType.$visitor;
|
|
14
|
-
|
|
15
|
-
export type { MediaTypeVisitorOptions };
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* @public
|
|
19
|
-
*/
|
|
20
|
-
class MediaTypeVisitor extends BaseMediaTypeVisitor {
|
|
21
|
-
declare public readonly element: MediaTypeElement;
|
|
22
|
-
|
|
23
|
-
constructor(options: MediaTypeVisitorOptions) {
|
|
24
|
-
super(options);
|
|
25
|
-
this.element = new MediaTypeElement();
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export default MediaTypeVisitor;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
specificationObj as OpenApi3_1Specification,
|
|
3
|
-
OAuthFlowVisitorOptions,
|
|
4
|
-
OAuthFlowVisitor as OAuthFlowVisitorType,
|
|
5
|
-
} from '@speclynx/apidom-ns-openapi-3-0';
|
|
6
|
-
|
|
7
|
-
import OAuthFlowElement from '../../../../elements/OAuthFlow.ts';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @public
|
|
11
|
-
*/
|
|
12
|
-
export const BaseOAuthFlowVisitor: typeof OAuthFlowVisitorType =
|
|
13
|
-
OpenApi3_1Specification.visitors.document.objects.OAuthFlow.$visitor;
|
|
14
|
-
|
|
15
|
-
export type { OAuthFlowVisitorOptions };
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* @public
|
|
19
|
-
*/
|
|
20
|
-
class OAuthFlowVisitor extends BaseOAuthFlowVisitor {
|
|
21
|
-
declare public readonly element: OAuthFlowElement;
|
|
22
|
-
|
|
23
|
-
constructor(options: OAuthFlowVisitorOptions) {
|
|
24
|
-
super(options);
|
|
25
|
-
this.element = new OAuthFlowElement();
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export default OAuthFlowVisitor;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
specificationObj as OpenApi3_1Specification,
|
|
3
|
-
OAuthFlowsVisitorOptions,
|
|
4
|
-
OAuthFlowsVisitor as OAuthFlowsVisitorType,
|
|
5
|
-
} from '@speclynx/apidom-ns-openapi-3-0';
|
|
6
|
-
|
|
7
|
-
import OAuthFlowsElement from '../../../../elements/OAuthFlows.ts';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @public
|
|
11
|
-
*/
|
|
12
|
-
export const BaseOAuthFlowsVisitor: typeof OAuthFlowsVisitorType =
|
|
13
|
-
OpenApi3_1Specification.visitors.document.objects.OAuthFlows.$visitor;
|
|
14
|
-
|
|
15
|
-
export type { OAuthFlowsVisitorOptions };
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* @public
|
|
19
|
-
*/
|
|
20
|
-
class OAuthFlowsVisitor extends BaseOAuthFlowsVisitor {
|
|
21
|
-
declare public readonly element: OAuthFlowsElement;
|
|
22
|
-
|
|
23
|
-
constructor(options: OAuthFlowsVisitorOptions) {
|
|
24
|
-
super(options);
|
|
25
|
-
this.element = new OAuthFlowsElement();
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export default OAuthFlowsVisitor;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
specificationObj as OpenApi3_1Specification,
|
|
3
|
-
OperationVisitorOptions,
|
|
4
|
-
OperationVisitor as OperationVisitorType,
|
|
5
|
-
} from '@speclynx/apidom-ns-openapi-3-0';
|
|
6
|
-
|
|
7
|
-
import OperationElement from '../../../../elements/Operation.ts';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @public
|
|
11
|
-
*/
|
|
12
|
-
export const BaseOperationVisitor: typeof OperationVisitorType =
|
|
13
|
-
OpenApi3_1Specification.visitors.document.objects.Operation.$visitor;
|
|
14
|
-
|
|
15
|
-
export type { OperationVisitorOptions };
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* @public
|
|
19
|
-
*/
|
|
20
|
-
class OperationVisitor extends BaseOperationVisitor {
|
|
21
|
-
declare public readonly element: OperationElement;
|
|
22
|
-
|
|
23
|
-
constructor(options: OperationVisitorOptions) {
|
|
24
|
-
super(options);
|
|
25
|
-
this.element = new OperationElement();
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export default OperationVisitor;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
specificationObj as OpenApi3_1Specification,
|
|
3
|
-
ParameterVisitorOptions,
|
|
4
|
-
ParameterVisitor as ParameterVisitorType,
|
|
5
|
-
} from '@speclynx/apidom-ns-openapi-3-0';
|
|
6
|
-
|
|
7
|
-
import ParameterElement from '../../../../elements/Parameter.ts';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @public
|
|
11
|
-
*/
|
|
12
|
-
export const BaseParameterVisitor: typeof ParameterVisitorType =
|
|
13
|
-
OpenApi3_1Specification.visitors.document.objects.Parameter.$visitor;
|
|
14
|
-
|
|
15
|
-
export type { ParameterVisitorOptions };
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* @public
|
|
19
|
-
*/
|
|
20
|
-
class ParameterVisitor extends BaseParameterVisitor {
|
|
21
|
-
declare public readonly element: ParameterElement;
|
|
22
|
-
|
|
23
|
-
constructor(options: ParameterVisitorOptions) {
|
|
24
|
-
super(options);
|
|
25
|
-
this.element = new ParameterElement();
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export default ParameterVisitor;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
specificationObj as OpenApi3_1Specification,
|
|
3
|
-
PathItemVisitorOptions,
|
|
4
|
-
PathItemVisitor as PathItemVisitorType,
|
|
5
|
-
} from '@speclynx/apidom-ns-openapi-3-0';
|
|
6
|
-
|
|
7
|
-
import PathItemElement from '../../../../elements/PathItem.ts';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @public
|
|
11
|
-
*/
|
|
12
|
-
export const BasePathItemVisitor: typeof PathItemVisitorType =
|
|
13
|
-
OpenApi3_1Specification.visitors.document.objects.PathItem.$visitor;
|
|
14
|
-
|
|
15
|
-
export type { PathItemVisitorOptions };
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* @public
|
|
19
|
-
*/
|
|
20
|
-
class PathItemVisitor extends BasePathItemVisitor {
|
|
21
|
-
declare public readonly element: PathItemElement;
|
|
22
|
-
|
|
23
|
-
constructor(options: PathItemVisitorOptions) {
|
|
24
|
-
super(options);
|
|
25
|
-
this.element = new PathItemElement();
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export default PathItemVisitor;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
specificationObj as OpenApi3_1Specification,
|
|
3
|
-
PathsVisitorOptions,
|
|
4
|
-
PathsVisitor as PathsVisitorType,
|
|
5
|
-
} from '@speclynx/apidom-ns-openapi-3-0';
|
|
6
|
-
|
|
7
|
-
import PathsElement from '../../../../elements/Paths.ts';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @public
|
|
11
|
-
*/
|
|
12
|
-
export const BasePathsVisitor: typeof PathsVisitorType =
|
|
13
|
-
OpenApi3_1Specification.visitors.document.objects.Paths.$visitor;
|
|
14
|
-
|
|
15
|
-
export type { PathsVisitorOptions };
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* @public
|
|
19
|
-
*/
|
|
20
|
-
class PathsVisitor extends BasePathsVisitor {
|
|
21
|
-
declare public readonly element: PathsElement;
|
|
22
|
-
|
|
23
|
-
constructor(options: PathsVisitorOptions) {
|
|
24
|
-
super(options);
|
|
25
|
-
this.element = new PathsElement();
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export default PathsVisitor;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
specificationObj as OpenApi3_1Specification,
|
|
3
|
-
ReferenceVisitorOptions,
|
|
4
|
-
ReferenceVisitor as ReferenceVisitorType,
|
|
5
|
-
} from '@speclynx/apidom-ns-openapi-3-0';
|
|
6
|
-
|
|
7
|
-
import ReferenceElement from '../../../../elements/Reference.ts';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @public
|
|
11
|
-
*/
|
|
12
|
-
export const BaseReferenceVisitor: typeof ReferenceVisitorType =
|
|
13
|
-
OpenApi3_1Specification.visitors.document.objects.Reference.$visitor;
|
|
14
|
-
|
|
15
|
-
export type { ReferenceVisitorOptions };
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* @public
|
|
19
|
-
*/
|
|
20
|
-
class ReferenceVisitor extends BaseReferenceVisitor {
|
|
21
|
-
declare public readonly element: ReferenceElement;
|
|
22
|
-
|
|
23
|
-
constructor(options: ReferenceVisitorOptions) {
|
|
24
|
-
super(options);
|
|
25
|
-
this.element = new ReferenceElement();
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export default ReferenceVisitor;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
specificationObj as OpenApi3_1Specification,
|
|
3
|
-
RequestBodyVisitorOptions,
|
|
4
|
-
RequestBodyVisitor as RequestBodyVisitorType,
|
|
5
|
-
} from '@speclynx/apidom-ns-openapi-3-0';
|
|
6
|
-
|
|
7
|
-
import RequestBodyElement from '../../../../elements/RequestBody.ts';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @public
|
|
11
|
-
*/
|
|
12
|
-
export const BaseRequestBodyVisitor: typeof RequestBodyVisitorType =
|
|
13
|
-
OpenApi3_1Specification.visitors.document.objects.RequestBody.$visitor;
|
|
14
|
-
|
|
15
|
-
export type { RequestBodyVisitorOptions };
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* @public
|
|
19
|
-
*/
|
|
20
|
-
class RequestBodyVisitor extends BaseRequestBodyVisitor {
|
|
21
|
-
declare public readonly element: RequestBodyElement;
|
|
22
|
-
|
|
23
|
-
constructor(options: RequestBodyVisitorOptions) {
|
|
24
|
-
super(options);
|
|
25
|
-
this.element = new RequestBodyElement();
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export default RequestBodyVisitor;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
specificationObj as OpenApi3_1Specification,
|
|
3
|
-
ResponseVisitorOptions,
|
|
4
|
-
ResponseVisitor as ResponseVisitorType,
|
|
5
|
-
} from '@speclynx/apidom-ns-openapi-3-0';
|
|
6
|
-
|
|
7
|
-
import ResponseElement from '../../../../elements/Response.ts';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @public
|
|
11
|
-
*/
|
|
12
|
-
export const BaseResponseVisitor: typeof ResponseVisitorType =
|
|
13
|
-
OpenApi3_1Specification.visitors.document.objects.Response.$visitor;
|
|
14
|
-
|
|
15
|
-
export type { ResponseVisitorOptions };
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* @public
|
|
19
|
-
*/
|
|
20
|
-
class ResponseVisitor extends BaseResponseVisitor {
|
|
21
|
-
declare public readonly element: ResponseElement;
|
|
22
|
-
|
|
23
|
-
constructor(options: ResponseVisitorOptions) {
|
|
24
|
-
super(options);
|
|
25
|
-
this.element = new ResponseElement();
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export default ResponseVisitor;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
specificationObj as OpenApi3_1Specification,
|
|
3
|
-
ResponsesVisitorOptions,
|
|
4
|
-
ResponsesVisitor as ResponsesVisitorType,
|
|
5
|
-
} from '@speclynx/apidom-ns-openapi-3-0';
|
|
6
|
-
|
|
7
|
-
import ResponsesElement from '../../../../elements/Responses.ts';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @public
|
|
11
|
-
*/
|
|
12
|
-
export const BaseResponsesVisitor: typeof ResponsesVisitorType =
|
|
13
|
-
OpenApi3_1Specification.visitors.document.objects.Responses.$visitor;
|
|
14
|
-
|
|
15
|
-
export type { ResponsesVisitorOptions };
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* @public
|
|
19
|
-
*/
|
|
20
|
-
class ResponsesVisitor extends BaseResponsesVisitor {
|
|
21
|
-
declare public readonly element: ResponsesElement;
|
|
22
|
-
|
|
23
|
-
constructor(options: ResponsesVisitorOptions) {
|
|
24
|
-
super(options);
|
|
25
|
-
this.element = new ResponsesElement();
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export default ResponsesVisitor;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
$defsVisitor as $defsJSONSchema202012Visitor,
|
|
3
|
-
$defsVisitorOptions,
|
|
4
|
-
} from '@speclynx/apidom-ns-json-schema-2020-12';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @public
|
|
8
|
-
*/
|
|
9
|
-
export type { $defsVisitorOptions };
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @public
|
|
13
|
-
*/
|
|
14
|
-
class $defsVisitor extends $defsJSONSchema202012Visitor {
|
|
15
|
-
constructor(options: $defsVisitorOptions) {
|
|
16
|
-
super(options);
|
|
17
|
-
this.passingOptionsNames.push('parent');
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export default $defsVisitor;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AllOfVisitor as AllOfJSONSchema202012Options,
|
|
3
|
-
AllOfVisitorOptions,
|
|
4
|
-
} from '@speclynx/apidom-ns-json-schema-2020-12';
|
|
5
|
-
|
|
6
|
-
export type { AllOfVisitorOptions };
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @public
|
|
10
|
-
*/
|
|
11
|
-
class AllOfVisitor extends AllOfJSONSchema202012Options {
|
|
12
|
-
constructor(options: AllOfVisitorOptions) {
|
|
13
|
-
super(options);
|
|
14
|
-
this.passingOptionsNames.push('parent');
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export default AllOfVisitor;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AnyOfVisitor as AnyOfJSONSchema202012Options,
|
|
3
|
-
AnyOfVisitorOptions,
|
|
4
|
-
} from '@speclynx/apidom-ns-json-schema-2020-12';
|
|
5
|
-
|
|
6
|
-
export type { AnyOfVisitorOptions };
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @public
|
|
10
|
-
*/
|
|
11
|
-
class AnyOfVisitor extends AnyOfJSONSchema202012Options {
|
|
12
|
-
constructor(options: AnyOfVisitorOptions) {
|
|
13
|
-
super(options);
|
|
14
|
-
this.passingOptionsNames.push('parent');
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export default AnyOfVisitor;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DependentSchemasVisitor as DependentSchemaJSONSchema202012Visitor,
|
|
3
|
-
DependentSchemasVisitorOptions,
|
|
4
|
-
} from '@speclynx/apidom-ns-json-schema-2020-12';
|
|
5
|
-
|
|
6
|
-
export type { DependentSchemasVisitorOptions };
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @public
|
|
10
|
-
*/
|
|
11
|
-
class DependentSchemasVisitor extends DependentSchemaJSONSchema202012Visitor {
|
|
12
|
-
constructor(options: DependentSchemasVisitorOptions) {
|
|
13
|
-
super(options);
|
|
14
|
-
this.passingOptionsNames.push('parent');
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export default DependentSchemasVisitor;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
OneOfVisitor as OneOfJSONSchema202012Options,
|
|
3
|
-
OneOfVisitorOptions,
|
|
4
|
-
} from '@speclynx/apidom-ns-json-schema-2020-12';
|
|
5
|
-
|
|
6
|
-
export type { OneOfVisitorOptions };
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @public
|
|
10
|
-
*/
|
|
11
|
-
class OneOfVisitor extends OneOfJSONSchema202012Options {
|
|
12
|
-
constructor(options: OneOfVisitorOptions) {
|
|
13
|
-
super(options);
|
|
14
|
-
this.passingOptionsNames.push('parent');
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export default OneOfVisitor;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
PatternPropertiesVisitor as PatternPropertiesJSONSchema202012Visitor,
|
|
3
|
-
PatternPropertiesVisitorOptions,
|
|
4
|
-
} from '@speclynx/apidom-ns-json-schema-2020-12';
|
|
5
|
-
|
|
6
|
-
export type { PatternPropertiesVisitorOptions };
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @public
|
|
10
|
-
*/
|
|
11
|
-
class PatternPropertiesVisitor extends PatternPropertiesJSONSchema202012Visitor {
|
|
12
|
-
constructor(options: PatternPropertiesVisitorOptions) {
|
|
13
|
-
super(options);
|
|
14
|
-
this.passingOptionsNames.push('parent');
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export default PatternPropertiesVisitor;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
PrefixItemsVisitor as PrefixItemsJSONSchema202012Visitor,
|
|
3
|
-
PrefixItemsVisitorOptions,
|
|
4
|
-
} from '@speclynx/apidom-ns-json-schema-2020-12';
|
|
5
|
-
|
|
6
|
-
export type { PrefixItemsVisitorOptions };
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @public
|
|
10
|
-
*/
|
|
11
|
-
class PrefixItemsVisitor extends PrefixItemsJSONSchema202012Visitor {
|
|
12
|
-
constructor(options: PrefixItemsVisitorOptions) {
|
|
13
|
-
super(options);
|
|
14
|
-
this.passingOptionsNames.push('parent');
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export default PrefixItemsVisitor;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
PropertiesVisitor as PropertiesJSONSchema202012Visitor,
|
|
3
|
-
PropertiesVisitorOptions,
|
|
4
|
-
} from '@speclynx/apidom-ns-json-schema-2020-12';
|
|
5
|
-
|
|
6
|
-
export type { PropertiesVisitorOptions };
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @public
|
|
10
|
-
*/
|
|
11
|
-
class PropertiesVisitor extends PropertiesJSONSchema202012Visitor {
|
|
12
|
-
constructor(options: PropertiesVisitorOptions) {
|
|
13
|
-
super(options);
|
|
14
|
-
this.passingOptionsNames.push('parent');
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export default PropertiesVisitor;
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { always } from 'ramda';
|
|
2
|
-
import { ObjectElement, BooleanElement, isStringElement } from '@speclynx/apidom-datamodel';
|
|
3
|
-
import { toValue } from '@speclynx/apidom-core';
|
|
4
|
-
import { Path } from '@speclynx/apidom-traverse';
|
|
5
|
-
import { FixedFieldsVisitor } from '@speclynx/apidom-ns-openapi-3-0';
|
|
6
|
-
import { JSONSchemaVisitor } from '@speclynx/apidom-ns-json-schema-2020-12';
|
|
7
|
-
|
|
8
|
-
import { isJsonSchemaDialectElement } from '../../../../predicates.ts';
|
|
9
|
-
import SchemaElement from '../../../../elements/Schema.ts';
|
|
10
|
-
import JsonSchemaDialectElement from '../../../../elements/JsonSchemaDialect.ts';
|
|
11
|
-
import { BaseSchemaVisitor, BaseSchemaVisitorOptions } from '../bases.ts';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* @public
|
|
15
|
-
*/
|
|
16
|
-
export interface SchemaVisitorOptions extends BaseSchemaVisitorOptions {}
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* @public
|
|
20
|
-
*/
|
|
21
|
-
class SchemaVisitor extends BaseSchemaVisitor {
|
|
22
|
-
declare public readonly element: SchemaElement;
|
|
23
|
-
|
|
24
|
-
declare protected readonly jsonSchemaDefaultDialect: JsonSchemaDialectElement;
|
|
25
|
-
|
|
26
|
-
constructor(options: SchemaVisitorOptions) {
|
|
27
|
-
super(options);
|
|
28
|
-
this.element = new SchemaElement();
|
|
29
|
-
this.specPath = always(['document', 'objects', 'Schema']);
|
|
30
|
-
this.canSupportSpecificationExtensions = true;
|
|
31
|
-
this.jsonSchemaDefaultDialect = JsonSchemaDialectElement.default;
|
|
32
|
-
this.passingOptionsNames.push('parent');
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
ObjectElement(path: Path<ObjectElement>) {
|
|
36
|
-
const objectElement = path.node;
|
|
37
|
-
this.handleDialectIdentifier(objectElement);
|
|
38
|
-
this.handleSchemaIdentifier(objectElement);
|
|
39
|
-
|
|
40
|
-
// for further processing consider this Schema Element as parent for all embedded Schema Elements
|
|
41
|
-
this.parent = this.element;
|
|
42
|
-
FixedFieldsVisitor.prototype.ObjectElement.call(this, path);
|
|
43
|
-
|
|
44
|
-
// mark this SchemaElement with reference metadata
|
|
45
|
-
if (isStringElement(this.element.$ref)) {
|
|
46
|
-
this.element.classes.push('reference-element');
|
|
47
|
-
this.element.meta.set('referenced-element', 'schema');
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
BooleanElement(path: Path<BooleanElement>) {
|
|
52
|
-
JSONSchemaVisitor.prototype.BooleanElement.call(this, path);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* This function depends on some external context, so we need to make sure this function
|
|
57
|
-
* works even when no context is provided like when directly refracting generic Object Element
|
|
58
|
-
* into Schema Element: `SchemaElement.refract(new ObjectElement({ type: 'object' });`
|
|
59
|
-
*/
|
|
60
|
-
get defaultDialectIdentifier(): JsonSchemaDialectElement {
|
|
61
|
-
let jsonSchemaDialect: unknown;
|
|
62
|
-
|
|
63
|
-
if (
|
|
64
|
-
this.openApiSemanticElement !== undefined &&
|
|
65
|
-
// @ts-ignore
|
|
66
|
-
isJsonSchemaDialectElement(this.openApiSemanticElement.jsonSchemaDialect)
|
|
67
|
-
) {
|
|
68
|
-
// @ts-ignore
|
|
69
|
-
jsonSchemaDialect = toValue(this.openApiSemanticElement.jsonSchemaDialect);
|
|
70
|
-
} else if (this.sourceContext?.jsonSchemaDialect !== undefined) {
|
|
71
|
-
jsonSchemaDialect = this.sourceContext.jsonSchemaDialect;
|
|
72
|
-
} else {
|
|
73
|
-
jsonSchemaDialect = toValue(this.jsonSchemaDefaultDialect);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
return jsonSchemaDialect as JsonSchemaDialectElement;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
handleDialectIdentifier(objectElement: ObjectElement): void {
|
|
80
|
-
return JSONSchemaVisitor.prototype.handleDialectIdentifier.call(this, objectElement);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
handleSchemaIdentifier(objectElement: ObjectElement): void {
|
|
84
|
-
return JSONSchemaVisitor.prototype.handleSchemaIdentifier.call(this, objectElement);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export default SchemaVisitor;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
specificationObj as OpenApi3_1Specification,
|
|
3
|
-
SecurityRequirementVisitorOptions,
|
|
4
|
-
SecurityRequirementVisitor as SecurityRequirementVisitorType,
|
|
5
|
-
} from '@speclynx/apidom-ns-openapi-3-0';
|
|
6
|
-
|
|
7
|
-
import SecurityRequirementElement from '../../../../elements/SecurityRequirement.ts';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @public
|
|
11
|
-
*/
|
|
12
|
-
export const BaseSecurityRequirementVisitor: typeof SecurityRequirementVisitorType =
|
|
13
|
-
OpenApi3_1Specification.visitors.document.objects.SecurityRequirement.$visitor;
|
|
14
|
-
|
|
15
|
-
export type { SecurityRequirementVisitorOptions };
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* @public
|
|
19
|
-
*/
|
|
20
|
-
class SecurityRequirementVisitor extends BaseSecurityRequirementVisitor {
|
|
21
|
-
declare public readonly element: SecurityRequirementElement;
|
|
22
|
-
|
|
23
|
-
constructor(options: SecurityRequirementVisitorOptions) {
|
|
24
|
-
super(options);
|
|
25
|
-
this.element = new SecurityRequirementElement();
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export default SecurityRequirementVisitor;
|