@swagger-api/apidom-ns-openapi-2 0.94.0 → 0.96.0
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 +18 -0
- package/cjs/refractor/index.cjs +2 -2
- package/cjs/refractor/visitors/SpecificationVisitor.cjs +1 -8
- package/cjs/refractor/visitors/Visitor.cjs +11 -4
- package/dist/apidom-ns-openapi-2.browser.js +2429 -2294
- package/dist/apidom-ns-openapi-2.browser.min.js +1 -1
- package/es/refractor/index.mjs +2 -2
- package/es/refractor/visitors/SpecificationVisitor.mjs +1 -8
- package/es/refractor/visitors/Visitor.mjs +12 -5
- package/package.json +5 -5
- package/types/dist.d.ts +99 -33
package/es/refractor/index.mjs
CHANGED
|
@@ -15,8 +15,8 @@ const refract = (value, {
|
|
|
15
15
|
* We don't allow consumers to hook into this translation.
|
|
16
16
|
* Though we allow consumers to define their onw plugins on already transformed ApiDOM.
|
|
17
17
|
*/
|
|
18
|
-
const
|
|
19
|
-
const rootVisitor = new
|
|
18
|
+
const RootVisitorClass = path(specPath, resolvedSpec);
|
|
19
|
+
const rootVisitor = new RootVisitorClass({
|
|
20
20
|
specObj: resolvedSpec
|
|
21
21
|
});
|
|
22
22
|
visit(element, rootVisitor);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { pathSatisfies, path, pick } from 'ramda';
|
|
2
2
|
import { isFunction } from 'ramda-adjunct';
|
|
3
3
|
import { visit, cloneDeep } from '@swagger-api/apidom-core';
|
|
4
|
-
import { keyMap, getNodeType } from "../../traversal/visitor.mjs";
|
|
5
4
|
import Visitor from "./Visitor.mjs";
|
|
6
5
|
import FallbackVisitor from "./FallbackVisitor.mjs";
|
|
7
6
|
/**
|
|
@@ -58,13 +57,7 @@ class SpecificationVisitor extends Visitor {
|
|
|
58
57
|
if (visitor instanceof FallbackVisitor && (visitor === null || visitor === void 0 ? void 0 : visitor.constructor) === FallbackVisitor) {
|
|
59
58
|
return cloneDeep(element);
|
|
60
59
|
}
|
|
61
|
-
|
|
62
|
-
// @ts-ignore
|
|
63
|
-
visit(element, visitor, {
|
|
64
|
-
keyMap,
|
|
65
|
-
nodeTypeGetter: getNodeType,
|
|
66
|
-
...options
|
|
67
|
-
});
|
|
60
|
+
visit(element, visitor, options);
|
|
68
61
|
return visitor.element;
|
|
69
62
|
}
|
|
70
63
|
}
|
|
@@ -1,16 +1,23 @@
|
|
|
1
|
-
import { hasElementSourceMap } from '@swagger-api/apidom-core';
|
|
1
|
+
import { hasElementSourceMap, deepmerge } from '@swagger-api/apidom-core';
|
|
2
2
|
class Visitor {
|
|
3
3
|
element;
|
|
4
4
|
constructor(options = {}) {
|
|
5
5
|
Object.assign(this, options);
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
/* eslint-disable class-methods-use-this, no-param-reassign */
|
|
9
9
|
copyMetaAndAttributes(from, to) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
if (from.meta.length > 0 || to.meta.length > 0) {
|
|
11
|
+
to.meta = deepmerge(to.meta, from.meta);
|
|
12
|
+
if (hasElementSourceMap(from)) {
|
|
13
|
+
// avoid deep merging of source maps
|
|
14
|
+
to.meta.set('sourceMap', from.meta.get('sourceMap'));
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
if (from.attributes.length > 0 || from.meta.length > 0) {
|
|
18
|
+
to.attributes = deepmerge(to.attributes, from.attributes); // eslint-disable-line no-param-reassign
|
|
13
19
|
}
|
|
14
20
|
}
|
|
21
|
+
/* eslint-enable class-methods-use-this, no-param-reassign */
|
|
15
22
|
}
|
|
16
23
|
export default Visitor;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swagger-api/apidom-ns-openapi-2",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.96.0",
|
|
4
4
|
"description": "OpenAPI 2.0 namespace for ApiDOM.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"license": "Apache-2.0",
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@babel/runtime-corejs3": "^7.20.7",
|
|
45
|
-
"@swagger-api/apidom-core": "^0.
|
|
46
|
-
"@swagger-api/apidom-error": "^0.
|
|
47
|
-
"@swagger-api/apidom-ns-json-schema-draft-4": "^0.
|
|
45
|
+
"@swagger-api/apidom-core": "^0.96.0",
|
|
46
|
+
"@swagger-api/apidom-error": "^0.96.0",
|
|
47
|
+
"@swagger-api/apidom-ns-json-schema-draft-4": "^0.96.0",
|
|
48
48
|
"@types/ramda": "~0.29.6",
|
|
49
49
|
"ramda": "~0.29.1",
|
|
50
50
|
"ramda-adjunct": "^4.1.1",
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"README.md",
|
|
61
61
|
"CHANGELOG.md"
|
|
62
62
|
],
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "851320569f5a9bd24aff9deec3f5ba1e7f002917"
|
|
64
64
|
}
|
package/types/dist.d.ts
CHANGED
|
@@ -184,14 +184,18 @@ declare class FixedFieldsVisitor extends SpecificationVisitor {
|
|
|
184
184
|
ObjectElement(objectElement: ObjectElement): {};
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
+
interface SwaggerVisitorOptions$1 extends FixedFieldsVisitorOptions, VisitorOptions {
|
|
188
|
+
}
|
|
187
189
|
declare const SwaggerVisitor_base$1: ts_mixer_dist_types_types.Class<any[], FixedFieldsVisitor & FallbackVisitor, typeof FixedFieldsVisitor & typeof FallbackVisitor>;
|
|
188
190
|
declare class SwaggerVisitor$1 extends SwaggerVisitor_base$1 {
|
|
189
191
|
readonly element: Swagger;
|
|
190
192
|
protected readonly specPath: SpecPath<['document', 'objects', 'Swagger']>;
|
|
191
193
|
protected readonly canSupportSpecificationExtensions: true;
|
|
192
|
-
constructor(options:
|
|
194
|
+
constructor(options: SwaggerVisitorOptions$1);
|
|
193
195
|
}
|
|
194
196
|
|
|
197
|
+
interface SwaggerVisitorOptions extends SpecificationVisitorOptions, VisitorOptions {
|
|
198
|
+
}
|
|
195
199
|
declare const SwaggerVisitor_base: ts_mixer_dist_types_types.Class<any[], SpecificationVisitor & FallbackVisitor, typeof SpecificationVisitor & typeof FallbackVisitor>;
|
|
196
200
|
declare class SwaggerVisitor extends SwaggerVisitor_base {
|
|
197
201
|
element: SwaggerVersion;
|
|
@@ -246,10 +250,12 @@ declare class SwaggerSecurity extends ArrayElement {
|
|
|
246
250
|
constructor(content?: Array<unknown>, meta?: Meta, attributes?: Attributes);
|
|
247
251
|
}
|
|
248
252
|
|
|
253
|
+
interface SecurityVisitorOptions$1 extends SpecificationVisitorOptions, VisitorOptions {
|
|
254
|
+
}
|
|
249
255
|
declare const SecurityVisitor_base$1: ts_mixer_dist_types_types.Class<any[], SpecificationVisitor & FallbackVisitor, typeof SpecificationVisitor & typeof FallbackVisitor>;
|
|
250
256
|
declare class SecurityVisitor$1 extends SecurityVisitor_base$1 {
|
|
251
257
|
readonly element: SwaggerSecurity;
|
|
252
|
-
constructor(options:
|
|
258
|
+
constructor(options: SecurityVisitorOptions$1);
|
|
253
259
|
ArrayElement(arrayElement: ArrayElement): {};
|
|
254
260
|
}
|
|
255
261
|
|
|
@@ -258,19 +264,23 @@ declare class SwaggerTags extends ArrayElement {
|
|
|
258
264
|
constructor(content?: Array<unknown>, meta?: Meta, attributes?: Attributes);
|
|
259
265
|
}
|
|
260
266
|
|
|
267
|
+
interface TagsVisitorOptions extends SpecificationVisitorOptions, VisitorOptions {
|
|
268
|
+
}
|
|
261
269
|
declare const TagsVisitor_base: ts_mixer_dist_types_types.Class<any[], SpecificationVisitor & FallbackVisitor, typeof SpecificationVisitor & typeof FallbackVisitor>;
|
|
262
270
|
declare class TagsVisitor$1 extends TagsVisitor_base {
|
|
263
271
|
readonly element: SwaggerTags;
|
|
264
|
-
constructor(options:
|
|
272
|
+
constructor(options: TagsVisitorOptions);
|
|
265
273
|
ArrayElement(arrayElement: ArrayElement): {};
|
|
266
274
|
}
|
|
267
275
|
|
|
276
|
+
interface InfoVisitorOptions extends FixedFieldsVisitorOptions, VisitorOptions {
|
|
277
|
+
}
|
|
268
278
|
declare const InfoVisitor_base: ts_mixer_dist_types_types.Class<any[], FixedFieldsVisitor & FallbackVisitor, typeof FixedFieldsVisitor & typeof FallbackVisitor>;
|
|
269
279
|
declare class InfoVisitor extends InfoVisitor_base {
|
|
270
280
|
readonly element: Info;
|
|
271
281
|
protected readonly specPath: SpecPath<['document', 'objects', 'Info']>;
|
|
272
282
|
protected readonly canSupportSpecificationExtensions: true;
|
|
273
|
-
constructor(options:
|
|
283
|
+
constructor(options: InfoVisitorOptions);
|
|
274
284
|
}
|
|
275
285
|
|
|
276
286
|
declare class VersionVisitor extends FallbackVisitor {
|
|
@@ -278,20 +288,24 @@ declare class VersionVisitor extends FallbackVisitor {
|
|
|
278
288
|
StringElement(stringElement: StringElement): {};
|
|
279
289
|
}
|
|
280
290
|
|
|
291
|
+
interface ContactVisitorOptions extends FixedFieldsVisitorOptions, VisitorOptions {
|
|
292
|
+
}
|
|
281
293
|
declare const ContactVisitor_base: ts_mixer_dist_types_types.Class<any[], FixedFieldsVisitor & FallbackVisitor, typeof FixedFieldsVisitor & typeof FallbackVisitor>;
|
|
282
294
|
declare class ContactVisitor extends ContactVisitor_base {
|
|
283
295
|
readonly element: Contact;
|
|
284
296
|
protected readonly specPath: SpecPath<['document', 'objects', 'Contact']>;
|
|
285
297
|
protected readonly canSupportSpecificationExtensions: true;
|
|
286
|
-
constructor(options:
|
|
298
|
+
constructor(options: ContactVisitorOptions);
|
|
287
299
|
}
|
|
288
300
|
|
|
301
|
+
interface LicenseVisitorOptions extends FixedFieldsVisitorOptions, VisitorOptions {
|
|
302
|
+
}
|
|
289
303
|
declare const LicenseVisitor_base: ts_mixer_dist_types_types.Class<any[], FixedFieldsVisitor & FallbackVisitor, typeof FixedFieldsVisitor & typeof FallbackVisitor>;
|
|
290
304
|
declare class LicenseVisitor extends LicenseVisitor_base {
|
|
291
305
|
readonly element: License;
|
|
292
306
|
protected readonly specPath: SpecPath<['document', 'objects', 'License']>;
|
|
293
307
|
protected readonly canSupportSpecificationExtensions: true;
|
|
294
|
-
constructor(options:
|
|
308
|
+
constructor(options: LicenseVisitorOptions);
|
|
295
309
|
}
|
|
296
310
|
|
|
297
311
|
interface PatternedFieldsVisitorOptions extends SpecificationVisitorOptions {
|
|
@@ -311,12 +325,14 @@ declare class PatternedFieldsVisitor extends SpecificationVisitor {
|
|
|
311
325
|
ObjectElement(objectElement: ObjectElement): {};
|
|
312
326
|
}
|
|
313
327
|
|
|
328
|
+
interface PathsVisitorOptions extends PatternedFieldsVisitorOptions, VisitorOptions {
|
|
329
|
+
}
|
|
314
330
|
declare const PathsVisitor_base: ts_mixer_dist_types_types.Class<any[], PatternedFieldsVisitor & FallbackVisitor, typeof PatternedFieldsVisitor & typeof FallbackVisitor>;
|
|
315
331
|
declare class PathsVisitor extends PathsVisitor_base {
|
|
316
332
|
readonly element: Paths;
|
|
317
333
|
protected readonly specPath: SpecPath<['document', 'objects', 'PathItem']>;
|
|
318
334
|
protected readonly canSupportSpecificationExtensions: true;
|
|
319
|
-
constructor(options:
|
|
335
|
+
constructor(options: PathsVisitorOptions);
|
|
320
336
|
ObjectElement(objectElement: ObjectElement): {};
|
|
321
337
|
}
|
|
322
338
|
|
|
@@ -445,11 +461,13 @@ declare class PathItem extends ObjectElement {
|
|
|
445
461
|
set parameters(parameters: ArrayElement | undefined);
|
|
446
462
|
}
|
|
447
463
|
|
|
464
|
+
interface PathItemVisitorOptions extends FixedFieldsVisitorOptions, VisitorOptions {
|
|
465
|
+
}
|
|
448
466
|
declare const PathItemVisitor_base: ts_mixer_dist_types_types.Class<any[], FixedFieldsVisitor & FallbackVisitor, typeof FixedFieldsVisitor & typeof FallbackVisitor>;
|
|
449
467
|
declare class PathItemVisitor extends PathItemVisitor_base {
|
|
450
468
|
readonly element: PathItem;
|
|
451
469
|
protected readonly specPath: SpecPath<['document', 'objects', 'PathItem']>;
|
|
452
|
-
constructor(options:
|
|
470
|
+
constructor(options: PathItemVisitorOptions);
|
|
453
471
|
ObjectElement(objectElement: ObjectElement): {};
|
|
454
472
|
}
|
|
455
473
|
|
|
@@ -463,18 +481,22 @@ declare class PathItemParameters extends ArrayElement {
|
|
|
463
481
|
constructor(content?: Array<unknown>, meta?: Meta, attributes?: Attributes);
|
|
464
482
|
}
|
|
465
483
|
|
|
484
|
+
interface ParametersVisitorOptions$1 extends SpecificationVisitorOptions, VisitorOptions {
|
|
485
|
+
}
|
|
466
486
|
declare const ParametersVisitor_base$1: ts_mixer_dist_types_types.Class<any[], SpecificationVisitor & FallbackVisitor, typeof SpecificationVisitor & typeof FallbackVisitor>;
|
|
467
487
|
declare class ParametersVisitor$1 extends ParametersVisitor_base$1 {
|
|
468
488
|
readonly element: PathItemParameters;
|
|
469
|
-
constructor(options:
|
|
489
|
+
constructor(options: ParametersVisitorOptions$1);
|
|
470
490
|
ArrayElement(arrayElement: ArrayElement): {};
|
|
471
491
|
}
|
|
472
492
|
|
|
493
|
+
interface OperationVisitorOptions extends FixedFieldsVisitorOptions, VisitorOptions {
|
|
494
|
+
}
|
|
473
495
|
declare const OperationVisitor_base: ts_mixer_dist_types_types.Class<any[], FixedFieldsVisitor & FallbackVisitor, typeof FixedFieldsVisitor & typeof FallbackVisitor>;
|
|
474
496
|
declare class OperationVisitor extends OperationVisitor_base {
|
|
475
497
|
readonly element: Operation;
|
|
476
498
|
protected readonly specPath: SpecPath<['document', 'objects', 'Operation']>;
|
|
477
|
-
constructor(options:
|
|
499
|
+
constructor(options: OperationVisitorOptions);
|
|
478
500
|
}
|
|
479
501
|
|
|
480
502
|
declare class OperationTags extends ArrayElement {
|
|
@@ -515,10 +537,12 @@ declare class OperationParameters extends ArrayElement {
|
|
|
515
537
|
constructor(content?: Array<unknown>, meta?: Meta, attributes?: Attributes);
|
|
516
538
|
}
|
|
517
539
|
|
|
540
|
+
interface ParametersVisitorOptions extends SpecificationVisitorOptions, VisitorOptions {
|
|
541
|
+
}
|
|
518
542
|
declare const ParametersVisitor_base: ts_mixer_dist_types_types.Class<any[], SpecificationVisitor & FallbackVisitor, typeof SpecificationVisitor & typeof FallbackVisitor>;
|
|
519
543
|
declare class ParametersVisitor extends ParametersVisitor_base {
|
|
520
544
|
readonly element: OperationParameters;
|
|
521
|
-
constructor(options:
|
|
545
|
+
constructor(options: ParametersVisitorOptions);
|
|
522
546
|
ArrayElement(arrayElement: ArrayElement): {};
|
|
523
547
|
}
|
|
524
548
|
|
|
@@ -538,19 +562,23 @@ declare class OperationSecurity extends ArrayElement {
|
|
|
538
562
|
constructor(content?: Array<unknown>, meta?: Meta, attributes?: Attributes);
|
|
539
563
|
}
|
|
540
564
|
|
|
565
|
+
interface SecurityVisitorOptions extends SpecificationVisitorOptions, VisitorOptions {
|
|
566
|
+
}
|
|
541
567
|
declare const SecurityVisitor_base: ts_mixer_dist_types_types.Class<any[], SpecificationVisitor & FallbackVisitor, typeof SpecificationVisitor & typeof FallbackVisitor>;
|
|
542
568
|
declare class SecurityVisitor extends SecurityVisitor_base {
|
|
543
569
|
readonly element: OperationSecurity;
|
|
544
|
-
constructor(options:
|
|
570
|
+
constructor(options: SecurityVisitorOptions);
|
|
545
571
|
ArrayElement(arrayElement: ArrayElement): {};
|
|
546
572
|
}
|
|
547
573
|
|
|
574
|
+
interface ExternalDocumentationVisitorOptions extends FixedFieldsVisitorOptions, VisitorOptions {
|
|
575
|
+
}
|
|
548
576
|
declare const ExternalDocumentationVisitor_base: ts_mixer_dist_types_types.Class<any[], FixedFieldsVisitor & FallbackVisitor, typeof FixedFieldsVisitor & typeof FallbackVisitor>;
|
|
549
577
|
declare class ExternalDocumentationVisitor extends ExternalDocumentationVisitor_base {
|
|
550
578
|
readonly element: ExternalDocumentation;
|
|
551
579
|
protected readonly specPath: SpecPath<['document', 'objects', 'ExternalDocumentation']>;
|
|
552
580
|
protected readonly canSupportSpecificationExtensions: true;
|
|
553
|
-
constructor(options:
|
|
581
|
+
constructor(options: ExternalDocumentationVisitorOptions);
|
|
554
582
|
}
|
|
555
583
|
|
|
556
584
|
declare class Parameter extends JSONSchemaElement {
|
|
@@ -643,12 +671,14 @@ declare class Parameter extends JSONSchemaElement {
|
|
|
643
671
|
set schema(schema: Schema | undefined);
|
|
644
672
|
}
|
|
645
673
|
|
|
674
|
+
interface ParameterVisitorOptions extends FixedFieldsVisitorOptions, VisitorOptions {
|
|
675
|
+
}
|
|
646
676
|
declare const ParameterVisitor_base: ts_mixer_dist_types_types.Class<any[], FixedFieldsVisitor & FallbackVisitor, typeof FixedFieldsVisitor & typeof FallbackVisitor>;
|
|
647
677
|
declare class ParameterVisitor extends ParameterVisitor_base {
|
|
648
678
|
readonly element: Parameter;
|
|
649
679
|
protected readonly specPath: SpecPath<['document', 'objects', 'Parameter']>;
|
|
650
680
|
protected readonly canSupportSpecificationExtensions: true;
|
|
651
|
-
constructor(options:
|
|
681
|
+
constructor(options: ParameterVisitorOptions);
|
|
652
682
|
}
|
|
653
683
|
|
|
654
684
|
declare class Items extends JSONSchemaElement {
|
|
@@ -725,12 +755,14 @@ declare class Items extends JSONSchemaElement {
|
|
|
725
755
|
set readOnly(readOnly: BooleanElement | undefined);
|
|
726
756
|
}
|
|
727
757
|
|
|
758
|
+
interface ItemsVisitorOptions extends FixedFieldsVisitorOptions, VisitorOptions {
|
|
759
|
+
}
|
|
728
760
|
declare const ItemsVisitor_base: ts_mixer_dist_types_types.Class<any[], FixedFieldsVisitor & FallbackVisitor, typeof FixedFieldsVisitor & typeof FallbackVisitor>;
|
|
729
761
|
declare class ItemsVisitor extends ItemsVisitor_base {
|
|
730
762
|
readonly element: Items;
|
|
731
763
|
protected readonly specPath: SpecPath<['document', 'objects', 'Items']>;
|
|
732
764
|
protected readonly canSupportSpecificationExtensions: true;
|
|
733
|
-
constructor(options:
|
|
765
|
+
constructor(options: ItemsVisitorOptions);
|
|
734
766
|
}
|
|
735
767
|
|
|
736
768
|
interface MixedFieldsVisitorOptions extends PatternedFieldsVisitorOptions {
|
|
@@ -745,6 +777,8 @@ declare class MixedFieldsVisitor extends MixedFieldsVisitor_base {
|
|
|
745
777
|
ObjectElement(objectElement: ObjectElement): {};
|
|
746
778
|
}
|
|
747
779
|
|
|
780
|
+
interface ResponsesVisitorOptions extends MixedFieldsVisitorOptions, VisitorOptions {
|
|
781
|
+
}
|
|
748
782
|
declare const ResponsesVisitor_base: ts_mixer_dist_types_types.Class<any[], MixedFieldsVisitor & FallbackVisitor, typeof MixedFieldsVisitor & typeof FallbackVisitor>;
|
|
749
783
|
declare class ResponsesVisitor extends ResponsesVisitor_base {
|
|
750
784
|
readonly element: Responses;
|
|
@@ -755,7 +789,7 @@ declare class ResponsesVisitor extends ResponsesVisitor_base {
|
|
|
755
789
|
'objects',
|
|
756
790
|
'Reference'
|
|
757
791
|
] | ['document', 'objects', 'Response']>;
|
|
758
|
-
constructor(options:
|
|
792
|
+
constructor(options: ResponsesVisitorOptions);
|
|
759
793
|
ObjectElement(objectElement: ObjectElement): {};
|
|
760
794
|
}
|
|
761
795
|
|
|
@@ -772,18 +806,22 @@ declare class AlternatingVisitor extends SpecificationVisitor {
|
|
|
772
806
|
enter(element: Element): {};
|
|
773
807
|
}
|
|
774
808
|
|
|
809
|
+
interface DefaultVisitorOptions extends AlternatingVisitorOptions, VisitorOptions {
|
|
810
|
+
}
|
|
775
811
|
declare const DefaultVisitor_base: ts_mixer_dist_types_types.Class<any[], AlternatingVisitor & FallbackVisitor, typeof AlternatingVisitor & typeof FallbackVisitor>;
|
|
776
812
|
declare class DefaultVisitor extends DefaultVisitor_base {
|
|
777
|
-
constructor(options:
|
|
813
|
+
constructor(options: DefaultVisitorOptions);
|
|
778
814
|
ObjectElement(objectElement: ObjectElement): {};
|
|
779
815
|
}
|
|
780
816
|
|
|
817
|
+
interface ResponseVisitorOptions extends FixedFieldsVisitorOptions, VisitorOptions {
|
|
818
|
+
}
|
|
781
819
|
declare const ResponseVisitor_base: ts_mixer_dist_types_types.Class<any[], FixedFieldsVisitor & FallbackVisitor, typeof FixedFieldsVisitor & typeof FallbackVisitor>;
|
|
782
820
|
declare class ResponseVisitor extends ResponseVisitor_base {
|
|
783
821
|
readonly element: Response;
|
|
784
822
|
protected readonly specPath: SpecPath<['document', 'objects', 'Response']>;
|
|
785
823
|
protected readonly canSupportSpecificationExtensions: true;
|
|
786
|
-
constructor(options:
|
|
824
|
+
constructor(options: ResponseVisitorOptions);
|
|
787
825
|
}
|
|
788
826
|
|
|
789
827
|
interface MapVisitorOptions extends PatternedFieldsVisitorOptions {
|
|
@@ -792,20 +830,24 @@ declare class MapVisitor extends PatternedFieldsVisitor {
|
|
|
792
830
|
constructor(options: MapVisitorOptions);
|
|
793
831
|
}
|
|
794
832
|
|
|
833
|
+
interface HeadersVisitorOptions extends MapVisitorOptions, VisitorOptions {
|
|
834
|
+
}
|
|
795
835
|
declare const HeadersVisitor_base: ts_mixer_dist_types_types.Class<any[], MapVisitor & FallbackVisitor, typeof MapVisitor & typeof FallbackVisitor>;
|
|
796
836
|
declare class HeadersVisitor extends HeadersVisitor_base {
|
|
797
837
|
readonly element: Headers;
|
|
798
838
|
protected readonly specPath: SpecPath<['document', 'objects', 'Header']>;
|
|
799
839
|
protected readonly canSupportSpecificationExtensions: false;
|
|
800
|
-
constructor(options:
|
|
840
|
+
constructor(options: HeadersVisitorOptions);
|
|
801
841
|
}
|
|
802
842
|
|
|
843
|
+
interface ExampleVisitorOptions extends MapVisitorOptions, VisitorOptions {
|
|
844
|
+
}
|
|
803
845
|
declare const ExampleVisitor_base: ts_mixer_dist_types_types.Class<any[], MapVisitor & FallbackVisitor, typeof MapVisitor & typeof FallbackVisitor>;
|
|
804
846
|
declare class ExampleVisitor extends ExampleVisitor_base {
|
|
805
847
|
readonly element: Example;
|
|
806
848
|
protected readonly specPath: SpecPath<['value']>;
|
|
807
849
|
protected readonly canSupportSpecificationExtensions: false;
|
|
808
|
-
constructor(options:
|
|
850
|
+
constructor(options: ExampleVisitorOptions);
|
|
809
851
|
}
|
|
810
852
|
|
|
811
853
|
declare class Header extends JSONSchemaElement {
|
|
@@ -880,12 +922,14 @@ declare class Header extends JSONSchemaElement {
|
|
|
880
922
|
set readOnly(readOnly: BooleanElement | undefined);
|
|
881
923
|
}
|
|
882
924
|
|
|
925
|
+
interface HeaderVisitorOptions extends FixedFieldsVisitorOptions, VisitorOptions {
|
|
926
|
+
}
|
|
883
927
|
declare const HeaderVisitor_base: ts_mixer_dist_types_types.Class<any[], FixedFieldsVisitor & FallbackVisitor, typeof FixedFieldsVisitor & typeof FallbackVisitor>;
|
|
884
928
|
declare class HeaderVisitor extends HeaderVisitor_base {
|
|
885
929
|
readonly element: Header;
|
|
886
930
|
protected readonly specPath: SpecPath<['document', 'objects', 'Header']>;
|
|
887
931
|
protected readonly canSupportSpecificationExtensions: true;
|
|
888
|
-
constructor(options:
|
|
932
|
+
constructor(options: HeaderVisitorOptions);
|
|
889
933
|
}
|
|
890
934
|
|
|
891
935
|
declare class Tag extends ObjectElement {
|
|
@@ -898,20 +942,24 @@ declare class Tag extends ObjectElement {
|
|
|
898
942
|
set externalDocs(externalDocs: ExternalDocumentation | undefined);
|
|
899
943
|
}
|
|
900
944
|
|
|
945
|
+
interface TagVisitorOptions extends FixedFieldsVisitorOptions, VisitorOptions {
|
|
946
|
+
}
|
|
901
947
|
declare const TagVisitor_base: ts_mixer_dist_types_types.Class<any[], FixedFieldsVisitor & FallbackVisitor, typeof FixedFieldsVisitor & typeof FallbackVisitor>;
|
|
902
948
|
declare class TagVisitor extends TagVisitor_base {
|
|
903
949
|
readonly element: Tag;
|
|
904
950
|
protected readonly specPath: SpecPath<['document', 'objects', 'Tag']>;
|
|
905
951
|
protected readonly canSupportSpecificationExtensions: true;
|
|
906
|
-
constructor(options:
|
|
952
|
+
constructor(options: TagVisitorOptions);
|
|
907
953
|
}
|
|
908
954
|
|
|
955
|
+
interface ReferenceVisitorOptions extends FixedFieldsVisitorOptions, VisitorOptions {
|
|
956
|
+
}
|
|
909
957
|
declare const ReferenceVisitor_base: ts_mixer_dist_types_types.Class<any[], FixedFieldsVisitor & FallbackVisitor, typeof FixedFieldsVisitor & typeof FallbackVisitor>;
|
|
910
958
|
declare class ReferenceVisitor extends ReferenceVisitor_base {
|
|
911
959
|
readonly element: Reference;
|
|
912
960
|
protected readonly specPath: SpecPath<['document', 'objects', 'Reference']>;
|
|
913
961
|
protected readonly canSupportSpecificationExtensions: false;
|
|
914
|
-
constructor(options:
|
|
962
|
+
constructor(options: ReferenceVisitorOptions);
|
|
915
963
|
ObjectElement(objectElement: ObjectElement): {};
|
|
916
964
|
}
|
|
917
965
|
|
|
@@ -920,12 +968,14 @@ declare class $RefVisitor extends FallbackVisitor {
|
|
|
920
968
|
StringElement(stringElement: StringElement): {};
|
|
921
969
|
}
|
|
922
970
|
|
|
971
|
+
interface SchemaVisitorOptions extends FixedFieldsVisitorOptions, VisitorOptions {
|
|
972
|
+
}
|
|
923
973
|
declare const SchemaVisitor_base: ts_mixer_dist_types_types.Class<any[], FixedFieldsVisitor & FallbackVisitor, typeof FixedFieldsVisitor & typeof FallbackVisitor>;
|
|
924
974
|
declare class SchemaVisitor extends SchemaVisitor_base {
|
|
925
975
|
readonly element: Schema;
|
|
926
976
|
protected readonly specPath: SpecPath<['document', 'objects', 'Schema']>;
|
|
927
977
|
protected readonly canSupportSpecificationExtensions: true;
|
|
928
|
-
constructor(options:
|
|
978
|
+
constructor(options: SchemaVisitorOptions);
|
|
929
979
|
}
|
|
930
980
|
|
|
931
981
|
declare class Xml extends ObjectElement {
|
|
@@ -942,14 +992,18 @@ declare class Xml extends ObjectElement {
|
|
|
942
992
|
set wrapped(wrapped: BooleanElement | undefined);
|
|
943
993
|
}
|
|
944
994
|
|
|
995
|
+
interface XmlVisitorOptions extends FixedFieldsVisitorOptions, VisitorOptions {
|
|
996
|
+
}
|
|
945
997
|
declare const XmlVisitor_base: ts_mixer_dist_types_types.Class<any[], FixedFieldsVisitor & FallbackVisitor, typeof FixedFieldsVisitor & typeof FallbackVisitor>;
|
|
946
998
|
declare class XmlVisitor extends XmlVisitor_base {
|
|
947
999
|
readonly element: Xml;
|
|
948
1000
|
protected readonly specPath: SpecPath<['document', 'objects', 'XML']>;
|
|
949
1001
|
protected readonly canSupportSpecificationExtensions: true;
|
|
950
|
-
constructor(options:
|
|
1002
|
+
constructor(options: XmlVisitorOptions);
|
|
951
1003
|
}
|
|
952
1004
|
|
|
1005
|
+
interface DefinitionsVisitorOptions extends MapVisitorOptions, VisitorOptions {
|
|
1006
|
+
}
|
|
953
1007
|
declare const DefinitionsVisitor_base: ts_mixer_dist_types_types.Class<any[], MapVisitor & FallbackVisitor, typeof MapVisitor & typeof FallbackVisitor>;
|
|
954
1008
|
declare class DefinitionsVisitor extends DefinitionsVisitor_base {
|
|
955
1009
|
readonly element: Definitions;
|
|
@@ -958,29 +1012,35 @@ declare class DefinitionsVisitor extends DefinitionsVisitor_base {
|
|
|
958
1012
|
'objects',
|
|
959
1013
|
'JSONReference'
|
|
960
1014
|
] | ['document', 'objects', 'Schema']>;
|
|
961
|
-
constructor(options:
|
|
1015
|
+
constructor(options: DefinitionsVisitorOptions);
|
|
962
1016
|
ObjectElement(objectElement: ObjectElement): {};
|
|
963
1017
|
}
|
|
964
1018
|
|
|
1019
|
+
interface ResponsesDefinitionsVisitorOptions extends MapVisitorOptions, VisitorOptions {
|
|
1020
|
+
}
|
|
965
1021
|
declare const ResponsesDefinitionsVisitor_base: ts_mixer_dist_types_types.Class<any[], MapVisitor & FallbackVisitor, typeof MapVisitor & typeof FallbackVisitor>;
|
|
966
1022
|
declare class ResponsesDefinitionsVisitor extends ResponsesDefinitionsVisitor_base {
|
|
967
1023
|
readonly element: ResponsesDefinitions;
|
|
968
1024
|
protected readonly specPath: SpecPath<['document', 'objects', 'Response']>;
|
|
969
|
-
constructor(options:
|
|
1025
|
+
constructor(options: ResponsesDefinitionsVisitorOptions);
|
|
970
1026
|
}
|
|
971
1027
|
|
|
1028
|
+
interface ParametersDefinitionsVisitorOptions extends MapVisitorOptions, VisitorOptions {
|
|
1029
|
+
}
|
|
972
1030
|
declare const ParametersDefinitionsVisitor_base: ts_mixer_dist_types_types.Class<any[], MapVisitor & FallbackVisitor, typeof MapVisitor & typeof FallbackVisitor>;
|
|
973
1031
|
declare class ParametersDefinitionsVisitor extends ParametersDefinitionsVisitor_base {
|
|
974
1032
|
readonly element: ParametersDefinitions;
|
|
975
1033
|
protected readonly specPath: SpecPath<['document', 'objects', 'Parameter']>;
|
|
976
|
-
constructor(options:
|
|
1034
|
+
constructor(options: ParametersDefinitionsVisitorOptions);
|
|
977
1035
|
}
|
|
978
1036
|
|
|
1037
|
+
interface SecurityDefinitionsVisitorOptions extends MapVisitorOptions, VisitorOptions {
|
|
1038
|
+
}
|
|
979
1039
|
declare const SecurityDefinitionsVisitor_base: ts_mixer_dist_types_types.Class<any[], MapVisitor & FallbackVisitor, typeof MapVisitor & typeof FallbackVisitor>;
|
|
980
1040
|
declare class SecurityDefinitionsVisitor extends SecurityDefinitionsVisitor_base {
|
|
981
1041
|
readonly element: SecurityDefinitions;
|
|
982
1042
|
protected readonly specPath: SpecPath<['document', 'objects', 'SecurityScheme']>;
|
|
983
|
-
constructor(options:
|
|
1043
|
+
constructor(options: SecurityDefinitionsVisitorOptions);
|
|
984
1044
|
}
|
|
985
1045
|
|
|
986
1046
|
declare class SecurityScheme extends ObjectElement {
|
|
@@ -1003,35 +1063,41 @@ declare class SecurityScheme extends ObjectElement {
|
|
|
1003
1063
|
set scopes(scopes: ArrayElement | undefined);
|
|
1004
1064
|
}
|
|
1005
1065
|
|
|
1066
|
+
interface SecuritySchemeVisitorOptions extends FixedFieldsVisitorOptions, VisitorOptions {
|
|
1067
|
+
}
|
|
1006
1068
|
declare const SecuritySchemeVisitor_base: ts_mixer_dist_types_types.Class<any[], FixedFieldsVisitor & FallbackVisitor, typeof FixedFieldsVisitor & typeof FallbackVisitor>;
|
|
1007
1069
|
declare class SecuritySchemeVisitor extends SecuritySchemeVisitor_base {
|
|
1008
1070
|
readonly element: SecurityScheme;
|
|
1009
1071
|
protected readonly specPath: SpecPath<['document', 'objects', 'SecurityScheme']>;
|
|
1010
1072
|
protected readonly canSupportSpecificationExtensions: true;
|
|
1011
|
-
constructor(options:
|
|
1073
|
+
constructor(options: SecuritySchemeVisitorOptions);
|
|
1012
1074
|
}
|
|
1013
1075
|
|
|
1014
1076
|
declare class Scopes extends ObjectElement {
|
|
1015
1077
|
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes);
|
|
1016
1078
|
}
|
|
1017
1079
|
|
|
1080
|
+
interface ScopesVisitorOptions extends MapVisitorOptions, VisitorOptions {
|
|
1081
|
+
}
|
|
1018
1082
|
declare const ScopesVisitor_base: ts_mixer_dist_types_types.Class<any[], MapVisitor & FallbackVisitor, typeof MapVisitor & typeof FallbackVisitor>;
|
|
1019
1083
|
declare class ScopesVisitor extends ScopesVisitor_base {
|
|
1020
1084
|
readonly element: Scopes;
|
|
1021
1085
|
protected readonly specPath: SpecPath<['value']>;
|
|
1022
1086
|
protected readonly canSupportSpecificationExtensions: true;
|
|
1023
|
-
constructor(options:
|
|
1087
|
+
constructor(options: ScopesVisitorOptions);
|
|
1024
1088
|
}
|
|
1025
1089
|
|
|
1026
1090
|
declare class SecurityRequirement extends ObjectElement {
|
|
1027
1091
|
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes);
|
|
1028
1092
|
}
|
|
1029
1093
|
|
|
1094
|
+
interface SecurityRequirementVisitorOptions extends MapVisitorOptions, VisitorOptions {
|
|
1095
|
+
}
|
|
1030
1096
|
declare const SecurityRequirementVisitor_base: ts_mixer_dist_types_types.Class<any[], MapVisitor & FallbackVisitor, typeof MapVisitor & typeof FallbackVisitor>;
|
|
1031
1097
|
declare class SecurityRequirementVisitor extends SecurityRequirementVisitor_base {
|
|
1032
1098
|
readonly element: SecurityRequirement;
|
|
1033
1099
|
protected readonly specPath: SpecPath<['value']>;
|
|
1034
|
-
constructor(options:
|
|
1100
|
+
constructor(options: SecurityRequirementVisitorOptions);
|
|
1035
1101
|
}
|
|
1036
1102
|
|
|
1037
1103
|
declare class SpecificationExtensionVisitor extends SpecificationVisitor {
|
|
@@ -1537,4 +1603,4 @@ declare const keyMap: {
|
|
|
1537
1603
|
SecurityRequirementElement: string[];
|
|
1538
1604
|
};
|
|
1539
1605
|
|
|
1540
|
-
export { AlternatingVisitor, Contact as ContactElement, Definitions as DefinitionsElement, Example as ExampleElement, ExternalDocumentation as ExternalDocumentationElement, FallbackVisitor, FixedFieldsVisitor, Header as HeaderElement, Headers as HeadersElement, Info as InfoElement, Items as ItemsElement, License as LicenseElement, MapVisitor, MixedFieldsVisitor, OpenAPIMediaTypes, OperationConsumes as OperationConsumesElement, Operation as OperationElement, OperationParameters as OperationParametersElement, OperationProduces as OperationProducesElement, OperationSchemes as OperationSchemesElement, OperationSecurity as OperationSecurityElement, OperationTags as OperationTagsElement, Parameter as ParameterElement, ParametersDefinitions as ParametersDefinitionsElement, PathItem as PathItemElement, PathItemParameters as PathItemParametersElement, Paths as PathsElement, PatternedFieldsVisitor, Reference as ReferenceElement, Response as ResponseElement, ResponsesDefinitions as ResponsesDefinitionsElement, Responses as ResponsesElement, Schema as SchemaElement, Scopes as ScopesElement, SecurityDefinitions as SecurityDefinitionsElement, SecurityRequirement as SecurityRequirementElement, SecurityScheme as SecuritySchemeElement, SpecificationVisitor, SwaggerConsumes as SwaggerConsumesElement, Swagger as SwaggerElement, SwaggerProduces as SwaggerProducesElement, SwaggerSchemes as SwaggerSchemesElement, SwaggerSecurity as SwaggerSecurityElement, SwaggerTags as SwaggerTagsElement, SwaggerVersion as SwaggerVersionElement, Tag as TagElement, Visitor, Xml as XmlElement, createRefractor, openApi2 as default, getNodeType, isContactElement, isDefinitionsElement, isExampleElement, isExternalDocumentationElement, isHeaderElement, isHeadersElement, isInfoElement, isItemsElement, isLicenseElement, isOperationElement, isParameterElement, isParametersDefinitionsElement, isPathItemElement, isPathsElement, isReferenceElement, isReferenceLikeElement, isResponseElement, isResponsesDefinitionsElement, isResponsesElement, isSchemaElement, isScopesElement, isSecurityDefinitionsElement, isSecurityRequirementElement, isSecuritySchemeElement, isSwaggerElement, isSwaggerExtension, isSwaggerVersionElement, isTagElement, isXmlElement, keyMap, mediaTypes, refract, plugin as refractorPluginReplaceEmptyElement, specification as specificationObj };
|
|
1606
|
+
export { AlternatingVisitor, type AlternatingVisitorOptions, BasePathVisitor, type VisitorOptions as BasePathVisitorOptions, ConsumesVisitor$1 as ConsumesVisitor, type VisitorOptions as ConsumesVisitorOptions, Contact as ContactElement, ContactVisitor, type ContactVisitorOptions, Definitions as DefinitionsElement, DefinitionsVisitor, type DefinitionsVisitorOptions, Example as ExampleElement, ExampleVisitor, type ExampleVisitorOptions, ExternalDocumentation as ExternalDocumentationElement, ExternalDocumentationVisitor, type ExternalDocumentationVisitorOptions, FallbackVisitor, type VisitorOptions as FallbackVisitorOptions, FixedFieldsVisitor, type FixedFieldsVisitorOptions, Header as HeaderElement, HeaderVisitor, type HeaderVisitorOptions, Headers as HeadersElement, HeadersVisitor, type HeadersVisitorOptions, HostVisitor, type VisitorOptions as HostVisitorOptions, Info as InfoElement, VersionVisitor as InfoVersionVisitor, type VisitorOptions as InfoVersionVisitorOptions, InfoVisitor, type InfoVisitorOptions, Items as ItemsElement, ItemsVisitor, type ItemsVisitorOptions, License as LicenseElement, LicenseVisitor, type LicenseVisitorOptions, MapVisitor, type MapVisitorOptions, MixedFieldsVisitor, type MixedFieldsVisitorOptions, OpenAPIMediaTypes, OperationConsumes as OperationConsumesElement, ConsumesVisitor as OperationConsumesVisitor, type VisitorOptions as OperationConsumesVisitorOptions, Operation as OperationElement, OperationParameters as OperationParametersElement, ParametersVisitor as OperationParametersVisitor, type ParametersVisitorOptions as OperationParametersVisitorOptions, OperationProduces as OperationProducesElement, ProducesVisitor as OperationProducesVisitor, type VisitorOptions as OperationProducesVisitorOptions, OperationSchemes as OperationSchemesElement, SchemesVisitor as OperationSchemesVisitor, type VisitorOptions as OperationSchemesVisitorOptions, OperationSecurity as OperationSecurityElement, SecurityVisitor as OperationSecurityVisitor, type SecurityVisitorOptions as OperationSecurityVisitorOptions, OperationTags as OperationTagsElement, TagsVisitor as OperationTagsVisitor, type VisitorOptions as OperationTagsVisitorOptions, OperationVisitor, type OperationVisitorOptions, Parameter as ParameterElement, ParameterVisitor, type ParameterVisitorOptions, ParametersDefinitions as ParametersDefinitionsElement, ParametersDefinitionsVisitor, type ParametersDefinitionsVisitorOptions, $RefVisitor$1 as PathItem$RefVisitor, type VisitorOptions as PathItem$RefVisitorOptions, PathItem as PathItemElement, PathItemParameters as PathItemParametersElement, ParametersVisitor$1 as PathItemParametersVisitor, type ParametersVisitorOptions$1 as PathItemParametersVisitorOptions, PathItemVisitor, type PathItemVisitorOptions, Paths as PathsElement, PathsVisitor, type PathsVisitorOptions, PatternedFieldsVisitor, type PatternedFieldsVisitorOptions, ProducesVisitor$1 as ProducesVisitor, type VisitorOptions as ProducesVisitorOptions, $RefVisitor as Reference$RefVisitor, type VisitorOptions as Reference$RefVisitorOptions, Reference as ReferenceElement, ReferenceVisitor, type ReferenceVisitorOptions, Response as ResponseElement, ResponseVisitor, type ResponseVisitorOptions, DefaultVisitor as ResponsesDefaultVisitor, type DefaultVisitorOptions as ResponsesDefaultVisitorOptions, ResponsesDefinitions as ResponsesDefinitionsElement, ResponsesDefinitionsVisitor, type ResponsesDefinitionsVisitorOptions, Responses as ResponsesElement, ResponsesVisitor, type ResponsesVisitorOptions, Schema as SchemaElement, SchemaVisitor, type SchemaVisitorOptions, SchemesVisitor$1 as SchemesVisitor, type VisitorOptions as SchemesVisitorOptions, Scopes as ScopesElement, ScopesVisitor, type ScopesVisitorOptions, SecurityDefinitions as SecurityDefinitionsElement, SecurityDefinitionsVisitor, type SecurityDefinitionsVisitorOptions, SecurityRequirement as SecurityRequirementElement, SecurityRequirementVisitor, type SecurityRequirementVisitorOptions, SecurityScheme as SecuritySchemeElement, SecuritySchemeVisitor, type SecuritySchemeVisitorOptions, SecurityVisitor$1 as SecurityVisitor, type SecurityVisitorOptions$1 as SecurityVisitorOptions, type SpecPath, SpecificationVisitor, type SpecificationVisitorOptions, SwaggerConsumes as SwaggerConsumesElement, Swagger as SwaggerElement, SwaggerProduces as SwaggerProducesElement, SwaggerSchemes as SwaggerSchemesElement, SwaggerSecurity as SwaggerSecurityElement, SwaggerTags as SwaggerTagsElement, SwaggerVersion as SwaggerVersionElement, SwaggerVisitor as SwaggerVersionVisitor, type SwaggerVisitorOptions as SwaggerVersionVisitorOptions, SwaggerVisitor$1 as SwaggerVisitor, type SwaggerVisitorOptions$1 as SwaggerVisitorOptions, Tag as TagElement, TagVisitor, type TagVisitorOptions, Visitor, type VisitorOptions, Xml as XmlElement, XmlVisitor, type XmlVisitorOptions, createRefractor, openApi2 as default, getNodeType, isContactElement, isDefinitionsElement, isExampleElement, isExternalDocumentationElement, isHeaderElement, isHeadersElement, isInfoElement, isItemsElement, isLicenseElement, isOperationElement, isParameterElement, isParametersDefinitionsElement, isPathItemElement, isPathsElement, isReferenceElement, isReferenceLikeElement, isResponseElement, isResponsesDefinitionsElement, isResponsesElement, isSchemaElement, isScopesElement, isSecurityDefinitionsElement, isSecurityRequirementElement, isSecuritySchemeElement, isSwaggerElement, isSwaggerExtension, isSwaggerVersionElement, isTagElement, isXmlElement, keyMap, mediaTypes, refract, plugin as refractorPluginReplaceEmptyElement, specification as specificationObj };
|