@api-client/core 0.8.1 → 0.8.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/build/browser.d.ts +3 -3
- package/build/browser.js.map +1 -1
- package/build/index.d.ts +3 -3
- package/build/index.js.map +1 -1
- package/build/oauth-popup.html +29 -0
- package/build/src/amf/AmfShapeGenerator.d.ts +2 -0
- package/build/src/amf/AmfShapeGenerator.js +2 -0
- package/build/src/amf/AmfShapeGenerator.js.map +1 -1
- package/build/src/amf/ApiSchemaValues.d.ts +4 -4
- package/build/src/amf/ApiSchemaValues.js.map +1 -1
- package/build/src/amf/Utils.js +3 -1
- package/build/src/amf/Utils.js.map +1 -1
- package/build/src/amf/data-node/XmlDataNodeGenerator.js +2 -1
- package/build/src/amf/data-node/XmlDataNodeGenerator.js.map +1 -1
- package/build/src/amf/shape/ShapeBase.d.ts +1 -1
- package/build/src/amf/shape/ShapeJsonSchemaGenerator.js +4 -2
- package/build/src/amf/shape/ShapeJsonSchemaGenerator.js.map +1 -1
- package/build/src/amf/shape/ShapeXmlSchemaGenerator.d.ts +13 -13
- package/build/src/amf/shape/ShapeXmlSchemaGenerator.js +25 -7
- package/build/src/amf/shape/ShapeXmlSchemaGenerator.js.map +1 -1
- package/build/src/authorization/OAuth2Authorization.d.ts +4 -4
- package/build/src/authorization/OAuth2Authorization.js +7 -7
- package/build/src/authorization/OAuth2Authorization.js.map +1 -1
- package/build/src/authorization/OidcAuthorization.js +0 -1
- package/build/src/authorization/OidcAuthorization.js.map +1 -1
- package/build/src/data/XmlReader.js +2 -0
- package/build/src/data/XmlReader.js.map +1 -1
- package/build/src/events/CustomEvent.d.ts +1 -1
- package/build/src/events/CustomEvent.js +1 -1
- package/build/src/lib/logging/DefaultLogger.js +1 -0
- package/build/src/lib/logging/DefaultLogger.js.map +1 -1
- package/build/src/lib/parsers/UriTemplate.js +1 -1
- package/build/src/lib/parsers/UrlEncoder.js +1 -0
- package/build/src/lib/parsers/UrlEncoder.js.map +1 -1
- package/build/src/mocking/LegacyInterfaces.d.ts +1 -2
- package/build/src/mocking/LegacyMock.js +0 -1
- package/build/src/mocking/LegacyMock.js.map +1 -1
- package/build/src/mocking/legacy/Http.js +1 -1
- package/build/src/mocking/legacy/Http.js.map +1 -1
- package/build/src/models/data/DataNamespace.d.ts +0 -1
- package/build/src/models/data/DataNamespace.js +1 -1
- package/build/src/models/data/DataNamespace.js.map +1 -1
- package/build/src/models/store/Permission.js.map +1 -1
- package/build/src/models/transformers/ArcLegacyTransformer.js +1 -0
- package/build/src/models/transformers/ArcLegacyTransformer.js.map +1 -1
- package/build/src/models/transformers/PostmanV21Transformer.d.ts +1 -2
- package/build/src/models/transformers/PostmanV21Transformer.js +2 -0
- package/build/src/models/transformers/PostmanV21Transformer.js.map +1 -1
- package/build/src/models/transformers/PostmanV2Transformer.js +2 -0
- package/build/src/models/transformers/PostmanV2Transformer.js.map +1 -1
- package/build/src/runtime/store/AuthSdk.js +1 -0
- package/build/src/runtime/store/AuthSdk.js.map +1 -1
- package/build/src/runtime/store/SdkBase.js.map +1 -1
- package/build/src/testing/TestCliHelper.js.map +1 -1
- package/data/apis/APIC-187/APIC-187.raml +21 -0
- package/data/apis/APIC-187/dataType.raml +132 -0
- package/data/apis/APIC-187/example.raml +84 -0
- package/data/apis/APIC-188/APIC-188.raml +21 -0
- package/data/apis/APIC-188/dataType.raml +132 -0
- package/data/apis/APIC-188/example.raml +84 -0
- package/data/apis/APIC-233/APIC-233.raml +15 -0
- package/data/apis/APIC-391/APIC-391.raml +44 -0
- package/data/apis/APIC-391/examples/post-body-request-example.raml +7 -0
- package/data/apis/APIC-487/APIC-487.raml +36 -0
- package/data/apis/APIC-655/APIC-655.raml +44 -0
- package/data/apis/APIC-655/delivery.json +12 -0
- package/data/apis/APIC-689/APIC-689.raml +20 -0
- package/data/apis/APIC-690/APIC-690.raml +17 -0
- package/data/apis/APIC-690/datatypes/Address.raml +10 -0
- package/data/apis/APIC-690/datatypes/Customer.raml +17 -0
- package/data/apis/APIC-690/examples/CustomerExample2.raml +17 -0
- package/data/apis/APIC-690/examples/CustomersExample.raml +34 -0
- package/data/apis/SE-10469/Purchase-Order-oagis-id-dd32f9c6c01048a19e15c423c9c741ae.json +1383 -0
- package/data/apis/SE-10469/SE-10469.raml +11 -0
- package/data/apis/SE-13092/Examples/PersonExample.raml +7 -0
- package/data/apis/SE-13092/SE-13092.raml +37 -0
- package/data/apis/SE-13092/datatypes/Address.raml +5 -0
- package/data/apis/SE-13092/datatypes/InlineType.raml +5 -0
- package/data/apis/SE-13092/datatypes/Person.raml +15 -0
- package/data/apis/SE-22063/SE-22063.raml +14 -0
- package/data/apis/SE-22063/stock.raml +41 -0
- package/data/apis/example-generator-api/contact-email-example.raml +6 -0
- package/data/apis/example-generator-api/contact-example.raml +5 -0
- package/data/apis/example-generator-api/contact-fax-example.raml +5 -0
- package/data/apis/example-generator-api/contact-website-example.raml +2 -0
- package/data/apis/example-generator-api/example-1.raml +6 -0
- package/data/apis/example-generator-api/example-2.raml +9 -0
- package/data/apis/example-generator-api/example-3.raml +4 -0
- package/data/apis/example-generator-api/example-4.raml +2 -0
- package/data/apis/example-generator-api/example-5.raml +4 -0
- package/data/apis/example-generator-api/example-6.raml +2 -0
- package/data/apis/example-generator-api/example-7.raml +5 -0
- package/data/apis/example-generator-api/example-generator-api.raml +423 -0
- package/data/apis/example-generator-api/example.json +14 -0
- package/data/apis/example-generator-api/example.xml +15 -0
- package/data/apis/example-generator-api/example.xsd +26 -0
- package/data/apis/example-generator-api/examples/employee.raml +7 -0
- package/data/apis/example-generator-api/examples/employees.raml +7 -0
- package/data/apis/example-generator-api/linked-named-example.raml +21 -0
- package/data/apis/example-generator-api/named-example-with-link.raml +5 -0
- package/data/apis/example-generator-api/named-example.raml +9 -0
- package/data/apis/example-generator-api/user-json-example.raml +17 -0
- package/data/apis/example-generator-api/user-raml-example.raml +37 -0
- package/data/apis/example-generator-api/user.json +8 -0
- package/data/apis/example-generator-api/user.raml +18 -0
- package/data/apis/example-generator-api/users-json-example.raml +17 -0
- package/data/apis/example-generator-api/users-raml-example.raml +32 -0
- package/data/apis/example-generator-api/users.json +8 -0
- package/data/apis/schema-api/schema-api.raml +13 -1
- package/data/apis/tracked-examples/datatypes/employee.raml +5 -0
- package/data/apis/tracked-examples/examples/employee.raml +4 -0
- package/data/apis/tracked-examples/examples/employees.raml +8 -0
- package/data/apis/tracked-examples/tracked-to-linked.raml +28 -0
- package/data/model.js +14 -0
- package/data/models/APIC-187.json +11398 -0
- package/data/models/APIC-188.json +11398 -0
- package/data/models/APIC-233.json +539 -0
- package/data/models/APIC-391.json +1872 -0
- package/data/models/APIC-487.json +1225 -0
- package/data/models/APIC-655.json +3109 -0
- package/data/models/APIC-689.json +761 -0
- package/data/models/APIC-690.json +5992 -0
- package/data/models/SE-10469.json +22882 -0
- package/data/models/SE-13092.json +2715 -0
- package/data/models/SE-22063.json +2276 -0
- package/data/models/example-generator-api.json +44978 -0
- package/data/models/schema-api.json +436 -428
- package/data/models/tracked-to-linked.json +1790 -0
- package/package.json +6 -5
- package/src/amf/AmfShapeGenerator.ts +5 -3
- package/src/amf/ApiSchemaValues.ts +5 -5
- package/src/amf/Utils.ts +6 -4
- package/src/amf/data-node/XmlDataNodeGenerator.ts +2 -1
- package/src/amf/shape/ShapeBase.ts +1 -1
- package/src/amf/shape/ShapeJsonSchemaGenerator.ts +4 -2
- package/src/amf/shape/ShapeXmlSchemaGenerator.ts +85 -66
- package/src/authorization/OAuth2Authorization.ts +33 -32
- package/src/authorization/OidcAuthorization.ts +3 -4
- package/src/data/XmlReader.ts +7 -5
- package/src/events/CustomEvent.ts +1 -1
- package/src/lib/logging/DefaultLogger.ts +1 -0
- package/src/lib/parsers/UriTemplate.ts +1 -1
- package/src/lib/parsers/UrlEncoder.ts +1 -0
- package/src/mocking/LegacyInterfaces.ts +1 -2
- package/src/mocking/LegacyMock.ts +0 -1
- package/src/mocking/legacy/Http.ts +1 -1
- package/src/models/data/DataNamespace.ts +2 -2
- package/src/models/store/Permission.ts +1 -1
- package/src/models/transformers/ArcLegacyTransformer.ts +1 -0
- package/src/models/transformers/PostmanV21Transformer.ts +3 -2
- package/src/models/transformers/PostmanV2Transformer.ts +2 -0
- package/src/runtime/store/AuthSdk.ts +1 -0
- package/src/runtime/store/SdkBase.ts +1 -0
- package/src/testing/TestCliHelper.ts +1 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
companyIdentification: !include example-1.raml
|
|
2
|
+
companyName: 'GRAYDON BELGIË NV'
|
|
3
|
+
alternateCompanyName: 'GRAYDON BELGIQUE NV'
|
|
4
|
+
tradeNames:
|
|
5
|
+
- 'GRAYDON'
|
|
6
|
+
- 'MARKTSELECT'
|
|
7
|
+
- 'CREDITEL'
|
|
8
|
+
- 'ACM'
|
|
9
|
+
- 'IT FACILITY MANAGEMENT'
|
|
10
|
+
companyAddress: !include example-2.raml
|
|
11
|
+
contactInformation: !include example-3.raml
|
|
12
|
+
legalForm: !include example-4.raml
|
|
13
|
+
size: !include example-5.raml
|
|
14
|
+
industry:
|
|
15
|
+
- !include example-6.raml
|
|
16
|
+
activities: !include example-7.raml
|
|
17
|
+
isActive: "true"
|
|
18
|
+
foundationDate: 1940-07-11
|
|
19
|
+
dissolutionDate: 2007-01-01
|
|
20
|
+
nonEmailIndicator: true
|
|
21
|
+
#numberOfBranchOffices: 0
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#%RAML 1.0 DataType
|
|
2
|
+
type: object
|
|
3
|
+
displayName: User
|
|
4
|
+
properties:
|
|
5
|
+
id:
|
|
6
|
+
displayName: Id
|
|
7
|
+
username:
|
|
8
|
+
displayName: Username
|
|
9
|
+
firstName:
|
|
10
|
+
displayName: First Name
|
|
11
|
+
lastName:
|
|
12
|
+
displayName: Last Name
|
|
13
|
+
profilePhoto:
|
|
14
|
+
displayName: Profile photo
|
|
15
|
+
email:
|
|
16
|
+
displayName: Email
|
|
17
|
+
example: !include user.json
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#%RAML 1.0 DataType
|
|
2
|
+
type: object
|
|
3
|
+
displayName: User
|
|
4
|
+
properties:
|
|
5
|
+
id:
|
|
6
|
+
displayName: Id
|
|
7
|
+
username:
|
|
8
|
+
displayName: Username
|
|
9
|
+
firstName:
|
|
10
|
+
displayName: First Name
|
|
11
|
+
lastName:
|
|
12
|
+
displayName: Last Name
|
|
13
|
+
profilePhoto:
|
|
14
|
+
displayName: Profile photo
|
|
15
|
+
email:
|
|
16
|
+
displayName: Email
|
|
17
|
+
age: integer
|
|
18
|
+
newsletter: boolean
|
|
19
|
+
examples:
|
|
20
|
+
User 1:
|
|
21
|
+
id: uid1
|
|
22
|
+
username: ppsztyc
|
|
23
|
+
firstName: Pawel
|
|
24
|
+
lastName: Psztyc
|
|
25
|
+
profilePhoto: https://img/domain.com/ppsztyc
|
|
26
|
+
email: ppsztyc@domain.com
|
|
27
|
+
age: 35
|
|
28
|
+
newsletter: true
|
|
29
|
+
User 2:
|
|
30
|
+
id: uid2
|
|
31
|
+
username: jdoe
|
|
32
|
+
firstName: John
|
|
33
|
+
lastName: Does
|
|
34
|
+
profilePhoto: https://img/domain.com/jdoe
|
|
35
|
+
email: jdoe@domain.com
|
|
36
|
+
age: 25
|
|
37
|
+
newsletter: false
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#%RAML 1.0 DataType
|
|
2
|
+
type: object
|
|
3
|
+
displayName: User
|
|
4
|
+
properties:
|
|
5
|
+
id:
|
|
6
|
+
displayName: Id
|
|
7
|
+
username:
|
|
8
|
+
displayName: Username
|
|
9
|
+
firstName:
|
|
10
|
+
displayName: First Name
|
|
11
|
+
lastName:
|
|
12
|
+
displayName: Last Name
|
|
13
|
+
profilePhoto:
|
|
14
|
+
displayName: Profile photo
|
|
15
|
+
email:
|
|
16
|
+
displayName: Email
|
|
17
|
+
age: integer
|
|
18
|
+
newsletter: boolean
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#%RAML 1.0 DataType
|
|
2
|
+
type: object
|
|
3
|
+
displayName: User
|
|
4
|
+
properties:
|
|
5
|
+
id:
|
|
6
|
+
displayName: Id
|
|
7
|
+
username:
|
|
8
|
+
displayName: Username
|
|
9
|
+
firstName:
|
|
10
|
+
displayName: First Name
|
|
11
|
+
lastName:
|
|
12
|
+
displayName: Last Name
|
|
13
|
+
profilePhoto:
|
|
14
|
+
displayName: Profile photo
|
|
15
|
+
email:
|
|
16
|
+
displayName: Email
|
|
17
|
+
example: !include users.json
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#%RAML 1.0 DataType
|
|
2
|
+
type: array
|
|
3
|
+
displayName: Users
|
|
4
|
+
items:
|
|
5
|
+
properties:
|
|
6
|
+
id:
|
|
7
|
+
displayName: Id
|
|
8
|
+
username:
|
|
9
|
+
displayName: Username
|
|
10
|
+
firstName:
|
|
11
|
+
displayName: First Name
|
|
12
|
+
lastName:
|
|
13
|
+
displayName: Last Name
|
|
14
|
+
profilePhoto:
|
|
15
|
+
displayName: Profile photo
|
|
16
|
+
email:
|
|
17
|
+
displayName: Email
|
|
18
|
+
examples:
|
|
19
|
+
User 1:
|
|
20
|
+
id: uid1
|
|
21
|
+
username: ppsztyc
|
|
22
|
+
firstName: Pawel
|
|
23
|
+
lastName: Psztyc
|
|
24
|
+
profilePhoto: https://img/domain.com/ppsztyc
|
|
25
|
+
email: ppsztyc@domain.com
|
|
26
|
+
User 2:
|
|
27
|
+
id: uid2
|
|
28
|
+
username: jdoe
|
|
29
|
+
firstName: John
|
|
30
|
+
lastName: Does
|
|
31
|
+
profilePhoto: https://img/domain.com/jdoe
|
|
32
|
+
email: jdoe@domain.com
|
|
@@ -428,7 +428,18 @@ types:
|
|
|
428
428
|
xml:
|
|
429
429
|
wrapped: true # This has no use here as it relates to an object property.
|
|
430
430
|
name: address-array-3
|
|
431
|
-
addresses4:
|
|
431
|
+
addresses4:
|
|
432
|
+
# Effectively it is the same as "addresses3"
|
|
433
|
+
# <XmlSerializationObject>
|
|
434
|
+
# ...
|
|
435
|
+
# <Address>
|
|
436
|
+
# <address-array-4>
|
|
437
|
+
# <street></street> <- items is not wrapped!
|
|
438
|
+
# <city></city>
|
|
439
|
+
# </address-array-4>
|
|
440
|
+
# </Address>
|
|
441
|
+
# ...
|
|
442
|
+
# </XmlSerializationObject>
|
|
432
443
|
type: Address[]
|
|
433
444
|
xml:
|
|
434
445
|
name: address-array-4
|
|
@@ -487,6 +498,7 @@ types:
|
|
|
487
498
|
type: Address
|
|
488
499
|
xml:
|
|
489
500
|
name: address
|
|
501
|
+
wrapped : true
|
|
490
502
|
xml:
|
|
491
503
|
name: addresses-array
|
|
492
504
|
wrapped : true
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#%RAML 1.0
|
|
2
|
+
title: optional-attributes-test
|
|
3
|
+
|
|
4
|
+
mediaType: application/xml
|
|
5
|
+
|
|
6
|
+
types:
|
|
7
|
+
Employee: !include datatypes/employee.raml
|
|
8
|
+
|
|
9
|
+
/employees:
|
|
10
|
+
get:
|
|
11
|
+
body:
|
|
12
|
+
application/json:
|
|
13
|
+
type: Employee[]
|
|
14
|
+
examples: !include examples/employees.raml
|
|
15
|
+
post:
|
|
16
|
+
body:
|
|
17
|
+
application/json:
|
|
18
|
+
type: Employee
|
|
19
|
+
examples: !include examples/employee.raml
|
|
20
|
+
delete:
|
|
21
|
+
body:
|
|
22
|
+
application/json:
|
|
23
|
+
type: Employee
|
|
24
|
+
examples: !include examples/employee.raml
|
|
25
|
+
head:
|
|
26
|
+
body:
|
|
27
|
+
type: Employee
|
|
28
|
+
examples: !include examples/employee.raml
|
package/data/model.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable no-console */
|
|
1
2
|
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
|
2
3
|
import pkg from 'amf-client-js';
|
|
3
4
|
import path from 'path';
|
|
@@ -32,6 +33,19 @@ config.set('async-api/async-api.yaml', { type: "ASYNC 2.0" });
|
|
|
32
33
|
config.set('flattened-api/flattened-api.raml', { type: 'RAML 1.0', mime: 'application/yaml', flattened: true });
|
|
33
34
|
config.set('expanded-api/expanded-api.raml', { type: 'RAML 1.0', mime: 'application/yaml', flattened: false });
|
|
34
35
|
config.set('multiple-servers/multiple-servers.yaml', { type: 'OAS 3.0', mime: 'application/yaml' });
|
|
36
|
+
config.set('APIC-187/APIC-187.raml', { type: 'RAML 1.0' });
|
|
37
|
+
config.set('APIC-188/APIC-188.raml', { type: 'RAML 1.0' });
|
|
38
|
+
config.set('APIC-233/APIC-233.raml', { type: 'RAML 0.8' });
|
|
39
|
+
config.set('APIC-391/APIC-391.raml', { type: 'RAML 1.0' });
|
|
40
|
+
config.set('APIC-487/APIC-487.raml', { type: 'RAML 1.0' });
|
|
41
|
+
config.set('APIC-655/APIC-655.raml', { type: 'RAML 1.0' });
|
|
42
|
+
config.set('APIC-689/APIC-689.raml', { type: 'RAML 1.0' });
|
|
43
|
+
config.set('APIC-690/APIC-690.raml', { type: 'RAML 1.0' });
|
|
44
|
+
config.set('example-generator-api/example-generator-api.raml', { type: "RAML 1.0" });
|
|
45
|
+
config.set('SE-10469/SE-10469.raml', { type: "RAML 1.0" });
|
|
46
|
+
config.set('SE-13092/SE-13092.raml', { type: 'RAML 1.0' });
|
|
47
|
+
config.set('SE-22063/SE-22063.raml', { type: 'RAML 1.0' });
|
|
48
|
+
config.set('tracked-examples/tracked-to-linked.raml', { type: 'RAML 1.0' });
|
|
35
49
|
|
|
36
50
|
const srcFolder = path.join('data', 'apis');
|
|
37
51
|
const descFolder = path.join('data', 'models');
|