Skip to content

Commit 9c7347d

Browse files
6.3.0 (#658)
* chore: add async api model * chore(deps): regenerate package-lock.json * 6.3.0 * refactor: _computeWebApi -> _computeApi * build: migrate test runner to web test runner * build: remove travis.yaml * build: add github workflow * test: fix test runner config * chore(deps): npm audit fixes * test: use actual amf for raml aware test
1 parent 9fe2c7d commit 9c7347d

File tree

12 files changed

+3224
-4438
lines changed

12 files changed

+3224
-4438
lines changed

.github/workflows/tests.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: tests
2+
3+
env:
4+
FORCE_COLOR: 1
5+
6+
on:
7+
push:
8+
pull_request:
9+
branches:
10+
- stage
11+
- master
12+
jobs:
13+
test_linux:
14+
name: ${{ matrix.os }} (${{ matrix.browser }})
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
os: [ubuntu-18.04, ubuntu-20.04]
19+
runs-on: ${{ matrix.os }}
20+
steps:
21+
- uses: actions/checkout@v2
22+
- uses: actions/setup-node@v1
23+
with:
24+
node-version: 14
25+
- uses: microsoft/playwright-github-action@v1
26+
- name: Install dependencies
27+
run: npm ci
28+
- name: Run tests
29+
run: npm test
30+
# test_win:
31+
# name: "Windows"
32+
# strategy:
33+
# fail-fast: false
34+
# runs-on: windows-latest
35+
# steps:
36+
# - uses: actions/checkout@v2
37+
# - uses: actions/setup-node@v1
38+
# with:
39+
# node-version: 14
40+
# - uses: microsoft/playwright-github-action@v1
41+
# - name: Install dependencies
42+
# run: npm ci
43+
# - name: Run tests
44+
# run: npm test

.travis.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

demo/apis.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@
1212
"models/apic-80/apic-80.raml": "RAML 1.0",
1313
"models/apic-83/apic-83.raml": "RAML 1.0",
1414
"models/multi-server/multi-server.yaml": { "type": "OAS 3.0", "mime": "application/yaml" },
15-
"models/oas-3-api/oas-3-api.yaml": { "type": "OAS 3.0", "mime": "application/yaml" }
15+
"models/oas-3-api/oas-3-api.yaml": { "type": "OAS 3.0", "mime": "application/yaml" },
16+
"models/async-api/async-api.yaml": "ASYNC 2.0"
1617
}
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
asyncapi: '2.0.0'
2+
info:
3+
title: Hello world application
4+
version: '0.1.0'
5+
servers:
6+
production:
7+
url: broker.mycompany.com
8+
protocol: amqp
9+
protocolVersion: 1.0.0
10+
description: This is "My Company" broker.
11+
security:
12+
- oAuth2: []
13+
- foo: []
14+
channels:
15+
hello:
16+
publish:
17+
message:
18+
$ref: '#/components/messages/hello-msg'
19+
goodbye:
20+
publish:
21+
message:
22+
$ref: '#/components/messages/goodbye-msg'
23+
components:
24+
messages:
25+
hello-msg:
26+
headers:
27+
$ref: '#/components/schemas/hello-headers'
28+
payload:
29+
type: object
30+
properties:
31+
name:
32+
type: string
33+
sentAt:
34+
$ref: '#/components/schemas/sent-at'
35+
goodbye-msg:
36+
headers:
37+
oneOf:
38+
- $ref: '#/components/schemas/goodbye-headers-1'
39+
- $ref: '#/components/schemas/goodbye-headers-2'
40+
payload:
41+
type: object
42+
properties:
43+
sentAt:
44+
$ref: '#/components/schemas/sent-at'
45+
schemas:
46+
sent-at:
47+
type: string
48+
description: The date and time a message was sent.
49+
format: datetime
50+
hello-headers:
51+
type: object
52+
properties:
53+
x-custom-header:
54+
description: You can put whatever you want here
55+
type: string
56+
Accept:
57+
description: You must specificy accept type for response
58+
type: string
59+
x-request-id:
60+
description: Request id for tracing errors
61+
type: string
62+
goodbye-headers-1:
63+
type: object
64+
properties:
65+
x-first-header:
66+
type: string
67+
x-second-header:
68+
type: string
69+
goodbye-headers-2:
70+
type: object
71+
properties:
72+
x-foo:
73+
type: string
74+
x-bar:
75+
type: string
76+
x-foo-bar:
77+
type: string
78+
securitySchemes:
79+
foo:
80+
type: userPassword
81+
description: This is the Foo scheme with username and password config
82+
oAuth2:
83+
type: oauth2
84+
flows:
85+
implicit:
86+
authorizationUrl: https://example.com/api/oauth/dialog
87+
scopes:
88+
write:pets: modify pets in your account
89+
read:pets: read your pets
90+
authorizationCode:
91+
authorizationUrl: https://example.com/api/oauth/dialog
92+
tokenUrl: https://example.com/api/oauth/token
93+
scopes:
94+
write:pets: modify pets in your account
95+
read:pets: read your pets

demo/standalone/app.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class ApicApplication extends DemoBase {
2121
['demo-api-v4', 'AMF v4'],
2222
['APIC-319', 'APIC-319'],
2323
['multi-server', 'OAS multi server'],
24+
['async-api', 'AsyncAPI'],
2425
];
2526
}
2627

karma.sl.config.js

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)