Skip to content

Commit

Permalink
6.3.0 (#658)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
twoplustwoone authored Nov 30, 2020
1 parent 9fe2c7d commit 9c7347d
Show file tree
Hide file tree
Showing 12 changed files with 3,224 additions and 4,438 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: tests

env:
FORCE_COLOR: 1

on:
push:
pull_request:
branches:
- stage
- master
jobs:
test_linux:
name: ${{ matrix.os }} (${{ matrix.browser }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, ubuntu-20.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14
- uses: microsoft/playwright-github-action@v1
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
# test_win:
# name: "Windows"
# strategy:
# fail-fast: false
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-node@v1
# with:
# node-version: 14
# - uses: microsoft/playwright-github-action@v1
# - name: Install dependencies
# run: npm ci
# - name: Run tests
# run: npm test
12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion demo/apis.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
"models/apic-80/apic-80.raml": "RAML 1.0",
"models/apic-83/apic-83.raml": "RAML 1.0",
"models/multi-server/multi-server.yaml": { "type": "OAS 3.0", "mime": "application/yaml" },
"models/oas-3-api/oas-3-api.yaml": { "type": "OAS 3.0", "mime": "application/yaml" }
"models/oas-3-api/oas-3-api.yaml": { "type": "OAS 3.0", "mime": "application/yaml" },
"models/async-api/async-api.yaml": "ASYNC 2.0"
}
95 changes: 95 additions & 0 deletions demo/models/async-api/async-api.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
asyncapi: '2.0.0'
info:
title: Hello world application
version: '0.1.0'
servers:
production:
url: broker.mycompany.com
protocol: amqp
protocolVersion: 1.0.0
description: This is "My Company" broker.
security:
- oAuth2: []
- foo: []
channels:
hello:
publish:
message:
$ref: '#/components/messages/hello-msg'
goodbye:
publish:
message:
$ref: '#/components/messages/goodbye-msg'
components:
messages:
hello-msg:
headers:
$ref: '#/components/schemas/hello-headers'
payload:
type: object
properties:
name:
type: string
sentAt:
$ref: '#/components/schemas/sent-at'
goodbye-msg:
headers:
oneOf:
- $ref: '#/components/schemas/goodbye-headers-1'
- $ref: '#/components/schemas/goodbye-headers-2'
payload:
type: object
properties:
sentAt:
$ref: '#/components/schemas/sent-at'
schemas:
sent-at:
type: string
description: The date and time a message was sent.
format: datetime
hello-headers:
type: object
properties:
x-custom-header:
description: You can put whatever you want here
type: string
Accept:
description: You must specificy accept type for response
type: string
x-request-id:
description: Request id for tracing errors
type: string
goodbye-headers-1:
type: object
properties:
x-first-header:
type: string
x-second-header:
type: string
goodbye-headers-2:
type: object
properties:
x-foo:
type: string
x-bar:
type: string
x-foo-bar:
type: string
securitySchemes:
foo:
type: userPassword
description: This is the Foo scheme with username and password config
oAuth2:
type: oauth2
flows:
implicit:
authorizationUrl: https://example.com/api/oauth/dialog
scopes:
write:pets: modify pets in your account
read:pets: read your pets
authorizationCode:
authorizationUrl: https://example.com/api/oauth/dialog
tokenUrl: https://example.com/api/oauth/token
scopes:
write:pets: modify pets in your account
read:pets: read your pets
1 change: 1 addition & 0 deletions demo/standalone/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class ApicApplication extends DemoBase {
['demo-api-v4', 'AMF v4'],
['APIC-319', 'APIC-319'],
['multi-server', 'OAS multi server'],
['async-api', 'AsyncAPI'],
];
}

Expand Down
23 changes: 0 additions & 23 deletions karma.sl.config.js

This file was deleted.

Loading

0 comments on commit 9c7347d

Please sign in to comment.