@api-client/core 0.6.14 → 0.6.15
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/build/browser.d.ts +9 -2
- package/build/browser.js +12 -2
- package/build/browser.js.map +1 -1
- package/build/index.d.ts +9 -2
- package/build/index.js +12 -2
- package/build/index.js.map +1 -1
- package/build/src/amf/AmfMixin.d.ts +395 -0
- package/build/src/amf/AmfMixin.js +1146 -0
- package/build/src/amf/AmfMixin.js.map +1 -0
- package/build/src/amf/AmfSerializer.d.ts +136 -0
- package/build/src/amf/AmfSerializer.js +1913 -0
- package/build/src/amf/AmfSerializer.js.map +1 -0
- package/build/src/amf/AmfShapeGenerator.d.ts +85 -0
- package/build/src/amf/AmfShapeGenerator.js +385 -0
- package/build/src/amf/AmfShapeGenerator.js.map +1 -0
- package/build/src/amf/AmfTypes.d.ts +24 -0
- package/build/src/amf/AmfTypes.js +122 -0
- package/build/src/amf/AmfTypes.js.map +1 -0
- package/build/src/amf/ApiExampleGenerator.d.ts +36 -0
- package/build/src/amf/ApiExampleGenerator.js +109 -0
- package/build/src/amf/ApiExampleGenerator.js.map +1 -0
- package/build/src/amf/ApiMonacoSchemaGenerator.d.ts +67 -0
- package/build/src/amf/ApiMonacoSchemaGenerator.js +243 -0
- package/build/src/amf/ApiMonacoSchemaGenerator.js.map +1 -0
- package/build/src/amf/ApiSchemaGenerator.d.ts +55 -0
- package/build/src/amf/ApiSchemaGenerator.js +94 -0
- package/build/src/amf/ApiSchemaGenerator.js.map +1 -0
- package/build/src/amf/ApiSchemaValues.d.ts +98 -0
- package/build/src/amf/ApiSchemaValues.js +382 -0
- package/build/src/amf/ApiSchemaValues.js.map +1 -0
- package/build/src/amf/Utils.d.ts +41 -0
- package/build/src/amf/Utils.js +176 -0
- package/build/src/amf/Utils.js.map +1 -0
- package/build/src/amf/data-node/DataNodeBase.d.ts +31 -0
- package/build/src/amf/data-node/DataNodeBase.js +77 -0
- package/build/src/amf/data-node/DataNodeBase.js.map +1 -0
- package/build/src/amf/data-node/JsonDataNodeGenerator.d.ts +15 -0
- package/build/src/amf/data-node/JsonDataNodeGenerator.js +24 -0
- package/build/src/amf/data-node/JsonDataNodeGenerator.js.map +1 -0
- package/build/src/amf/data-node/UrlEncodedDataNodeGenerator.d.ts +13 -0
- package/build/src/amf/data-node/UrlEncodedDataNodeGenerator.js +42 -0
- package/build/src/amf/data-node/UrlEncodedDataNodeGenerator.js.map +1 -0
- package/build/src/amf/data-node/XmlDataNodeGenerator.d.ts +21 -0
- package/build/src/amf/data-node/XmlDataNodeGenerator.js +30 -0
- package/build/src/amf/data-node/XmlDataNodeGenerator.js.map +1 -0
- package/build/src/amf/definitions/Amf.d.ts +362 -0
- package/build/src/amf/definitions/Amf.js +2 -0
- package/build/src/amf/definitions/Amf.js.map +1 -0
- package/build/src/amf/definitions/Api.d.ts +381 -0
- package/build/src/amf/definitions/Api.js +2 -0
- package/build/src/amf/definitions/Api.js.map +1 -0
- package/build/src/amf/definitions/Base.d.ts +11 -0
- package/build/src/amf/definitions/Base.js +2 -0
- package/build/src/amf/definitions/Base.js.map +1 -0
- package/build/src/amf/definitions/Namespace.d.ts +311 -0
- package/build/src/amf/definitions/Namespace.js +330 -0
- package/build/src/amf/definitions/Namespace.js.map +1 -0
- package/build/src/amf/definitions/Shapes.d.ts +309 -0
- package/build/src/amf/definitions/Shapes.js +87 -0
- package/build/src/amf/definitions/Shapes.js.map +1 -0
- package/build/src/amf/models/AmfDataNode.d.ts +68 -0
- package/build/src/amf/models/AmfDataNode.js +188 -0
- package/build/src/amf/models/AmfDataNode.js.map +1 -0
- package/build/src/amf/shape/ShapeBase.d.ts +75 -0
- package/build/src/amf/shape/ShapeBase.js +90 -0
- package/build/src/amf/shape/ShapeBase.js.map +1 -0
- package/build/src/amf/shape/ShapeJsonSchemaGenerator.d.ts +46 -0
- package/build/src/amf/shape/ShapeJsonSchemaGenerator.js +406 -0
- package/build/src/amf/shape/ShapeJsonSchemaGenerator.js.map +1 -0
- package/build/src/amf/shape/ShapeXmlSchemaGenerator.d.ts +84 -0
- package/build/src/amf/shape/ShapeXmlSchemaGenerator.js +820 -0
- package/build/src/amf/shape/ShapeXmlSchemaGenerator.js.map +1 -0
- package/build/src/models/data/Bindings.d.ts +161 -0
- package/build/src/models/data/Bindings.js +2 -0
- package/build/src/models/data/Bindings.js.map +1 -0
- package/build/src/models/data/DataAssociation.d.ts +135 -14
- package/build/src/models/data/DataAssociation.js +154 -21
- package/build/src/models/data/DataAssociation.js.map +1 -1
- package/build/src/models/data/DataAssociationSchema.d.ts +36 -0
- package/build/src/models/data/DataEntity.d.ts +54 -4
- package/build/src/models/data/DataEntity.js +85 -9
- package/build/src/models/data/DataEntity.js.map +1 -1
- package/build/src/models/data/DataFile.d.ts +3 -0
- package/build/src/models/data/DataFile.js +3 -0
- package/build/src/models/data/DataFile.js.map +1 -1
- package/build/src/models/data/DataModel.d.ts +1 -1
- package/build/src/models/data/DataModel.js.map +1 -1
- package/build/src/models/data/DataProperty.d.ts +107 -36
- package/build/src/models/data/DataProperty.js +147 -17
- package/build/src/models/data/DataProperty.js.map +1 -1
- package/data/apis/oas-date/oas-date.yaml +28 -0
- package/data/apis/oas-types/oas-types.yaml +159 -0
- package/data/apis/oas-unions/oas-unions.yaml +75 -0
- package/data/apis/raml-date/raml-date.raml +28 -0
- package/data/apis/recursive/recursive.raml +14 -0
- package/data/apis/schema-api/examples/person.json +14 -0
- package/data/apis/schema-api/examples/person.raml +14 -0
- package/data/apis/schema-api/examples/person.url.encoded +1 -0
- package/data/apis/schema-api/examples/person.xml +14 -0
- package/data/apis/schema-api/library/demo-types.raml +43 -0
- package/data/apis/schema-api/schema-api.raml +644 -0
- package/data/apis/schema-api/schemas/person.json +104 -0
- package/data/apis/schema-api/schemas/person.xsd +26 -0
- package/data/apis/schema-api/types/DemoPerson.raml +67 -0
- package/data/model.js +106 -0
- package/data/models/oas-date.json +637 -0
- package/data/models/oas-types.json +5352 -0
- package/data/models/oas-unions.json +1881 -0
- package/data/models/raml-date.json +1096 -0
- package/data/models/recursive.json +610 -0
- package/data/models/schema-api.json +37319 -0
- package/package.json +9 -6
- package/src/amf/AmfMixin.ts +1623 -0
- package/src/amf/AmfSerializer.ts +2028 -0
- package/src/amf/AmfShapeGenerator.ts +400 -0
- package/src/amf/AmfTypes.ts +126 -0
- package/src/amf/ApiExampleGenerator.ts +112 -0
- package/src/amf/ApiMonacoSchemaGenerator.ts +296 -0
- package/src/amf/ApiSchemaGenerator.ts +108 -0
- package/src/amf/ApiSchemaValues.ts +411 -0
- package/src/amf/Utils.ts +182 -0
- package/src/amf/data-node/DataNodeBase.ts +81 -0
- package/src/amf/data-node/JsonDataNodeGenerator.ts +26 -0
- package/src/amf/data-node/README.md +3 -0
- package/src/amf/data-node/UrlEncodedDataNodeGenerator.ts +43 -0
- package/src/amf/data-node/XmlDataNodeGenerator.ts +38 -0
- package/src/amf/definitions/Amf.ts +443 -0
- package/src/amf/definitions/Api.ts +427 -0
- package/src/amf/definitions/Base.ts +13 -0
- package/src/amf/definitions/Namespace.ts +341 -0
- package/src/amf/definitions/Shapes.ts +414 -0
- package/src/amf/models/AmfDataNode.ts +200 -0
- package/src/amf/shape/README.md +4 -0
- package/src/amf/shape/ShapeBase.ts +160 -0
- package/src/amf/shape/ShapeJsonSchemaGenerator.ts +422 -0
- package/src/amf/shape/ShapeXmlSchemaGenerator.ts +876 -0
- package/src/models/data/Bindings.ts +186 -0
- package/src/models/data/DataAssociation.ts +226 -29
- package/src/models/data/DataAssociationSchema.ts +38 -0
- package/src/models/data/DataEntity.ts +112 -14
- package/src/models/data/DataFile.ts +3 -0
- package/src/models/data/DataModel.ts +1 -1
- package/src/models/data/DataProperty.ts +191 -47
- package/build/src/models/data/DataPropertySchema.d.ts +0 -125
- package/build/src/models/data/DataPropertySchema.js +0 -33
- package/build/src/models/data/DataPropertySchema.js.map +0 -1
- package/src/models/data/DataPropertySchema.ts +0 -156
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "http://example.com/example.json",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"definitions": {},
|
|
5
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
6
|
+
"properties": {
|
|
7
|
+
"id": {
|
|
8
|
+
"$id": "/properties/id",
|
|
9
|
+
"type": "string",
|
|
10
|
+
"title": "The Id Schema ",
|
|
11
|
+
"default": "",
|
|
12
|
+
"examples": [
|
|
13
|
+
"R34fg663H9KW9MMSKISI"
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
"name": {
|
|
17
|
+
"$id": "/properties/name",
|
|
18
|
+
"type": "string",
|
|
19
|
+
"title": "The Name Schema ",
|
|
20
|
+
"default": "",
|
|
21
|
+
"examples": [
|
|
22
|
+
"Pawel Psztyc"
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"birthday": {
|
|
26
|
+
"$id": "/properties/birthday",
|
|
27
|
+
"type": "string",
|
|
28
|
+
"title": "The Birthday Schema ",
|
|
29
|
+
"default": "",
|
|
30
|
+
"examples": [
|
|
31
|
+
"1983-10-20"
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
"gender": {
|
|
35
|
+
"$id": "/properties/gender",
|
|
36
|
+
"type": "string",
|
|
37
|
+
"title": "The Gender Schema ",
|
|
38
|
+
"default": "",
|
|
39
|
+
"examples": [
|
|
40
|
+
"male"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
"url": {
|
|
44
|
+
"$id": "/properties/url",
|
|
45
|
+
"type": "string",
|
|
46
|
+
"title": "The Url Schema ",
|
|
47
|
+
"default": "",
|
|
48
|
+
"examples": [
|
|
49
|
+
"https://domain.com/profile/pawel.psztyc"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"image": {
|
|
53
|
+
"$id": "/properties/image",
|
|
54
|
+
"type": "object",
|
|
55
|
+
"properties": {
|
|
56
|
+
"url": {
|
|
57
|
+
"$id": "/properties/image/properties/url",
|
|
58
|
+
"type": "string",
|
|
59
|
+
"title": "The Url Schema ",
|
|
60
|
+
"default": "",
|
|
61
|
+
"examples": [
|
|
62
|
+
"https://domain.com/profile/pawel.psztyc/image"
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
"thumb": {
|
|
66
|
+
"$id": "/properties/image/properties/thumb",
|
|
67
|
+
"type": "string",
|
|
68
|
+
"title": "The Thumb Schema ",
|
|
69
|
+
"default": "",
|
|
70
|
+
"examples": [
|
|
71
|
+
"https://domain.com/profile/pawel.psztyc/image/thumb"
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"tagline": {
|
|
77
|
+
"$id": "/properties/tagline",
|
|
78
|
+
"type": "string",
|
|
79
|
+
"title": "The Tagline Schema ",
|
|
80
|
+
"default": "",
|
|
81
|
+
"examples": [
|
|
82
|
+
"Some text about me."
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
"language": {
|
|
86
|
+
"$id": "/properties/language",
|
|
87
|
+
"type": "string",
|
|
88
|
+
"title": "The Language Schema ",
|
|
89
|
+
"default": "",
|
|
90
|
+
"examples": [
|
|
91
|
+
"en_GB"
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
"etag": {
|
|
95
|
+
"$id": "/properties/etag",
|
|
96
|
+
"type": "string",
|
|
97
|
+
"title": "The Etag Schema ",
|
|
98
|
+
"default": "",
|
|
99
|
+
"examples": [
|
|
100
|
+
"W\\244m4n5kj3gbn2nj4k4n4"
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
|
|
3
|
+
<xs:element name="resource">
|
|
4
|
+
<xs:complexType>
|
|
5
|
+
<xs:sequence>
|
|
6
|
+
<xs:element name="id" type="xs:string"></xs:element>
|
|
7
|
+
<xs:element name="name" type="xs:string"></xs:element>
|
|
8
|
+
<xs:element name="birthday" type="xs:date"></xs:element>
|
|
9
|
+
<xs:element name="gender" type="xs:string"></xs:element>
|
|
10
|
+
<xs:element name="url" type="xs:string"></xs:element>
|
|
11
|
+
<xs:element name="image">
|
|
12
|
+
<xs:complexType>
|
|
13
|
+
<xs:sequence>
|
|
14
|
+
<xs:element name="url" type="xs:string"></xs:element>
|
|
15
|
+
<xs:element name="thumb" type="xs:string"></xs:element>
|
|
16
|
+
</xs:sequence>
|
|
17
|
+
</xs:complexType>
|
|
18
|
+
</xs:element>
|
|
19
|
+
<xs:element name="tagline" type="xs:string"></xs:element>
|
|
20
|
+
<xs:element name="language" type="xs:string"></xs:element>
|
|
21
|
+
</xs:sequence>
|
|
22
|
+
<xs:attribute name="error" type="xs:boolean" use="required"></xs:attribute>
|
|
23
|
+
<xs:attribute name="type" type="xs:string" use="required"></xs:attribute>
|
|
24
|
+
</xs:complexType>
|
|
25
|
+
</xs:element>
|
|
26
|
+
</xs:schema>
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
#%RAML 1.0 DataType
|
|
2
|
+
|
|
3
|
+
displayName: Person
|
|
4
|
+
description: |
|
|
5
|
+
A person but without examples defined inline.
|
|
6
|
+
|
|
7
|
+
type: object
|
|
8
|
+
|
|
9
|
+
properties:
|
|
10
|
+
id:
|
|
11
|
+
xml:
|
|
12
|
+
attribute: true
|
|
13
|
+
description: A unique identifier for a person. It is a 32 bit string containing alphanumeric characters.
|
|
14
|
+
type: string
|
|
15
|
+
example: ad3fd6d4-af89-11eb-8529-0242ac130003
|
|
16
|
+
name:
|
|
17
|
+
required: true
|
|
18
|
+
example: John Smith
|
|
19
|
+
description: Person full name. The input will be rejected if this property is not set while creating new object.
|
|
20
|
+
type: string
|
|
21
|
+
pattern: "[0-9a-zA-Z ]+"
|
|
22
|
+
xml:
|
|
23
|
+
attribute: true
|
|
24
|
+
name: fullname
|
|
25
|
+
birthday:
|
|
26
|
+
type: date-only
|
|
27
|
+
description: The person's date of birth, represented as YYYY-MM-DD.
|
|
28
|
+
examples:
|
|
29
|
+
Example 1: 1983-10-20
|
|
30
|
+
Example 2: 1994-08-29
|
|
31
|
+
gender?:
|
|
32
|
+
type: string
|
|
33
|
+
description: |
|
|
34
|
+
The person's gender. Possible values includes, but are not limited to, the following values:
|
|
35
|
+
* "male" - Male gender.
|
|
36
|
+
* "female" - Female gender.
|
|
37
|
+
* "other" - Other.
|
|
38
|
+
example: male
|
|
39
|
+
url:
|
|
40
|
+
type: string
|
|
41
|
+
description: The URL of this person's profile.
|
|
42
|
+
image:
|
|
43
|
+
type: !include ../resourceTypes/image.raml
|
|
44
|
+
xml:
|
|
45
|
+
wrapped: true
|
|
46
|
+
tagline:
|
|
47
|
+
type: string
|
|
48
|
+
description: The brief description (tagline) of this person.
|
|
49
|
+
language:
|
|
50
|
+
type: string
|
|
51
|
+
description: The user's preferred language for rendering.
|
|
52
|
+
example: "Polish"
|
|
53
|
+
tags:
|
|
54
|
+
description: Tags added to the person.
|
|
55
|
+
type: array
|
|
56
|
+
items:
|
|
57
|
+
properties:
|
|
58
|
+
name:
|
|
59
|
+
type: string
|
|
60
|
+
description: The name of the tag
|
|
61
|
+
example: Manager
|
|
62
|
+
id:
|
|
63
|
+
type: string
|
|
64
|
+
description: Tag's identifier.
|
|
65
|
+
example: ad3fda8a-af89-11eb-8529-0242ac130003
|
|
66
|
+
xml:
|
|
67
|
+
wrapped: false
|
package/data/model.js
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
|
2
|
+
import pkg from 'amf-client-js';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
import { writeFile, mkdir } from 'fs/promises';
|
|
5
|
+
|
|
6
|
+
/** @typedef {import('amf-client-js').AMFConfiguration} AMFConfiguration */
|
|
7
|
+
/**
|
|
8
|
+
* @typedef ApiConfiguration
|
|
9
|
+
* @property {string} type
|
|
10
|
+
* @property {string=} mime
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
const {
|
|
14
|
+
RAMLConfiguration,
|
|
15
|
+
OASConfiguration,
|
|
16
|
+
AsyncAPIConfiguration,
|
|
17
|
+
RenderOptions,
|
|
18
|
+
PipelineId,
|
|
19
|
+
} = pkg;
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
/** @type {Map<string, ApiConfiguration>} */
|
|
23
|
+
const config = new Map();
|
|
24
|
+
config.set('schema-api/schema-api.raml', { type: "RAML 1.0" });
|
|
25
|
+
config.set('raml-date/raml-date.raml', { type: "RAML 1.0" });
|
|
26
|
+
config.set('recursive/recursive.raml', { type: "RAML 1.0" });
|
|
27
|
+
config.set('oas-types/oas-types.yaml', { type: "OAS 3.0" });
|
|
28
|
+
config.set('oas-date/oas-date.yaml', { type: "OAS 3.0" });
|
|
29
|
+
config.set('oas-unions/oas-unions.yaml', { type: "OAS 3.0" });
|
|
30
|
+
|
|
31
|
+
const srcFolder = path.join('data', 'apis');
|
|
32
|
+
const descFolder = path.join('data', 'models');
|
|
33
|
+
|
|
34
|
+
class ApiParser {
|
|
35
|
+
/**
|
|
36
|
+
* @param {Map<string, ApiConfiguration>} list
|
|
37
|
+
*/
|
|
38
|
+
async batch(list) {
|
|
39
|
+
await mkdir(descFolder, { recursive: true });
|
|
40
|
+
for (const [file, info] of list) {
|
|
41
|
+
console.log('Processing API file', file);
|
|
42
|
+
try {
|
|
43
|
+
// eslint-disable-next-line no-await-in-loop
|
|
44
|
+
await this.run(file, info.type);
|
|
45
|
+
} catch (e) {
|
|
46
|
+
let message;
|
|
47
|
+
if (e.message) {
|
|
48
|
+
message = e.message;
|
|
49
|
+
} else {
|
|
50
|
+
message = e.toString();
|
|
51
|
+
}
|
|
52
|
+
console.error(`Unable to finish: `, message);
|
|
53
|
+
process.exit(1);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* @param {string} file
|
|
60
|
+
* @param {string} vendor
|
|
61
|
+
* @returns {Promise<void>}
|
|
62
|
+
*/
|
|
63
|
+
async run(file, vendor) {
|
|
64
|
+
let destFile = `${file.substring(0, file.lastIndexOf('.')) }.json`;
|
|
65
|
+
if (destFile.indexOf('/') !== -1) {
|
|
66
|
+
destFile = destFile.substring(destFile.lastIndexOf('/'));
|
|
67
|
+
}
|
|
68
|
+
const location = path.join(srcFolder, file);
|
|
69
|
+
const content = await this.parse(vendor, location);
|
|
70
|
+
const destination = path.join(descFolder, destFile);
|
|
71
|
+
await writeFile(destination, content);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* @param {string} vendor
|
|
76
|
+
* @param {string} location
|
|
77
|
+
* @returns {Promise<string>}
|
|
78
|
+
*/
|
|
79
|
+
async parse(vendor, location) {
|
|
80
|
+
const ro = new RenderOptions().withSourceMaps().withCompactUris();
|
|
81
|
+
// const ro = new RenderOptions().withoutAmfJsonLdSerialization().withoutCompactUris().withoutCompactedEmission().withPrettyPrint();
|
|
82
|
+
const apiConfiguration = this.getConfiguration(vendor).withRenderOptions(ro);
|
|
83
|
+
const client = apiConfiguration.baseUnitClient();
|
|
84
|
+
const result = await client.parse(`file://${location}`);
|
|
85
|
+
const transformed = client.transform(result.baseUnit, PipelineId.Editing);
|
|
86
|
+
return client.render(transformed.baseUnit, 'application/ld+json');
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* @param {string} vendor
|
|
91
|
+
* @returns {AMFConfiguration}
|
|
92
|
+
*/
|
|
93
|
+
getConfiguration(vendor) {
|
|
94
|
+
switch (vendor) {
|
|
95
|
+
case 'RAML 0.8': return RAMLConfiguration.RAML08();
|
|
96
|
+
case 'RAML 1.0': return RAMLConfiguration.RAML10();
|
|
97
|
+
case 'OAS 2.0': return OASConfiguration.OAS20();
|
|
98
|
+
case 'OAS 3.0': return OASConfiguration.OAS30();
|
|
99
|
+
case 'ASYNC 2.0': return AsyncAPIConfiguration.Async20();
|
|
100
|
+
default: throw new Error(`Unknown vendor: ${vendor}`);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
const parser = new ApiParser();
|
|
106
|
+
parser.batch(config);
|