Skip to content

Commit 69314c8

Browse files
Merge pull request #848 from mulesoft/build/6.6.41
Build/6.6.41 W-15594516
2 parents 19737b5 + 9979ec3 commit 69314c8

File tree

10 files changed

+1625
-66
lines changed

10 files changed

+1625
-66
lines changed

.github/workflows/deployment.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ jobs:
2121
strategy:
2222
fail-fast: false
2323
matrix:
24-
os: [ubuntu-20.04, windows-2019, macos-latest]
24+
os: [ubuntu-20.04, windows-2019]
2525
runs-on: ${{ matrix.os }}
2626
steps:
2727
- uses: actions/checkout@v2
2828
- uses: actions/setup-node@v1
2929
with:
30-
node-version: 14
30+
node-version: 18
3131
- uses: microsoft/playwright-github-action@v1
3232
- uses: actions/cache@v1
3333
with:
@@ -52,7 +52,7 @@ jobs:
5252
fetch-depth: 0
5353
- uses: actions/setup-node@v2
5454
with:
55-
node-version: '14.x'
55+
node-version: '18.x'
5656
registry-url: 'https://registry.npmjs.org'
5757
- uses: actions/cache@v1
5858
with:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,6 @@ dist/
6262
# AMF models
6363
demo/models/*.json
6464
demo/models/flattened/*.json
65+
!demo/models/jldAsync26.json
6566

6667
.idea/

demo/apis.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,6 @@
3333
"models/representative-service/representative-service.yaml": "OAS 3.0",
3434
"models/APIC-763/APIC-763.raml": "RAML 1.0",
3535
"models/multipart-api/multipart-api.raml": "RAML 1.0",
36-
"models/multiple-messages/multiple-messages.yaml": "ASYNC 2.0"
36+
"models/multiple-messages/multiple-messages.yaml": "ASYNC 2.0",
37+
"models/APIC-560/APIC-560.yaml": "ASYNC 2.0"
3738
}

demo/models/APIC-560/APIC-560.yaml

Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
asyncapi: 2.0.0
2+
info:
3+
title: Streetlights API
4+
version: '1.0.0'
5+
description: |
6+
The Smartylighting Streetlights API allows you to remotely manage the city lights.
7+
8+
### Check out its awesome features:
9+
10+
* Turn a specific streetlight on/off 🌃
11+
* Dim a specific streetlight 😎
12+
* Receive real-time information about environmental lighting conditions 📈
13+
license:
14+
name: Apache 2.0
15+
url: https://www.apache.org/licenses/LICENSE-2.0
16+
17+
servers:
18+
production:
19+
url: api.streetlights.smartylighting.com:{port}
20+
protocol: http
21+
description: Test broker
22+
variables:
23+
port:
24+
description: Secure connection (TLS) is available through port 8883.
25+
default: '1883'
26+
enum:
27+
- '1883'
28+
- '8883'
29+
security:
30+
- apiKey: []
31+
- supportedOauthFlows:
32+
- streetlights:on
33+
- streetlights:off
34+
- streetlights:dim
35+
- openIdConnectWellKnown: []
36+
37+
defaultContentType: application/json
38+
39+
channels:
40+
smartylighting/streetlights/1/0/event/{streetlightId}/lighting/measured:
41+
description: The topic on which measured values may be produced and consumed.
42+
parameters:
43+
streetlightId:
44+
$ref: '#/components/parameters/streetlightId'
45+
subscribe:
46+
summary: Receive information about environmental lighting conditions of a particular streetlight.
47+
operationId: receiveLightMeasurement
48+
traits:
49+
- $ref: '#/components/operationTraits/kafka'
50+
message:
51+
$ref: '#/components/messages/lightMeasured'
52+
53+
smartylighting/streetlights/1/0/action/{streetlightId}/turn/on:
54+
parameters:
55+
streetlightId:
56+
$ref: '#/components/parameters/streetlightId'
57+
publish:
58+
operationId: turnOn
59+
traits:
60+
- $ref: '#/components/operationTraits/kafka'
61+
message:
62+
$ref: '#/components/messages/turnOnOff'
63+
64+
smartylighting/streetlights/1/0/action/{streetlightId}/turn/off:
65+
parameters:
66+
streetlightId:
67+
$ref: '#/components/parameters/streetlightId'
68+
publish:
69+
operationId: turnOff
70+
traits:
71+
- $ref: '#/components/operationTraits/kafka'
72+
message:
73+
$ref: '#/components/messages/turnOnOff'
74+
75+
smartylighting/streetlights/1/0/action/{streetlightId}/dim:
76+
parameters:
77+
streetlightId:
78+
$ref: '#/components/parameters/streetlightId'
79+
publish:
80+
operationId: dimLight
81+
traits:
82+
- $ref: '#/components/operationTraits/kafka'
83+
message:
84+
$ref: '#/components/messages/dimLight'
85+
86+
components:
87+
messages:
88+
lightMeasured:
89+
name: lightMeasured
90+
title: Light measured
91+
summary: Inform about environmental lighting conditions for a particular streetlight.
92+
contentType: application/json
93+
traits:
94+
- $ref: '#/components/messageTraits/commonHeaders'
95+
payload:
96+
$ref: "#/components/schemas/lightMeasuredPayload"
97+
turnOnOff:
98+
name: turnOnOff
99+
title: Turn on/off
100+
summary: Command a particular streetlight to turn the lights on or off.
101+
traits:
102+
- $ref: '#/components/messageTraits/commonHeaders'
103+
payload:
104+
$ref: "#/components/schemas/turnOnOffPayload"
105+
dimLight:
106+
name: dimLight
107+
title: Dim light
108+
summary: Command a particular streetlight to dim the lights.
109+
traits:
110+
- $ref: '#/components/messageTraits/commonHeaders'
111+
payload:
112+
$ref: "#/components/schemas/dimLightPayload"
113+
114+
schemas:
115+
lightMeasuredPayload:
116+
type: object
117+
properties:
118+
lumens:
119+
type: integer
120+
minimum: 0
121+
description: Light intensity measured in lumens.
122+
sentAt:
123+
$ref: "#/components/schemas/sentAt"
124+
turnOnOffPayload:
125+
type: object
126+
properties:
127+
command:
128+
type: string
129+
enum:
130+
- on
131+
- off
132+
description: Whether to turn on or off the light.
133+
sentAt:
134+
$ref: "#/components/schemas/sentAt"
135+
dimLightPayload:
136+
type: object
137+
properties:
138+
percentage:
139+
type: integer
140+
description: Percentage to which the light should be dimmed to.
141+
minimum: 0
142+
maximum: 100
143+
sentAt:
144+
$ref: "#/components/schemas/sentAt"
145+
sentAt:
146+
type: string
147+
format: date-time
148+
description: Date and time when the message was sent.
149+
150+
securitySchemes:
151+
apiKey:
152+
type: apiKey
153+
in: user
154+
description: Provide your API key as the user and leave the password empty.
155+
supportedOauthFlows:
156+
type: oauth2
157+
description: Flows to support OAuth 2.0
158+
flows:
159+
implicit:
160+
authorizationUrl: 'https://authserver.example/auth'
161+
scopes:
162+
'streetlights:on': Ability to switch lights on
163+
'streetlights:off': Ability to switch lights off
164+
'streetlights:dim': Ability to dim the lights
165+
password:
166+
tokenUrl: 'https://authserver.example/token'
167+
scopes:
168+
'streetlights:on': Ability to switch lights on
169+
'streetlights:off': Ability to switch lights off
170+
'streetlights:dim': Ability to dim the lights
171+
clientCredentials:
172+
tokenUrl: 'https://authserver.example/token'
173+
scopes:
174+
'streetlights:on': Ability to switch lights on
175+
'streetlights:off': Ability to switch lights off
176+
'streetlights:dim': Ability to dim the lights
177+
authorizationCode:
178+
authorizationUrl: 'https://authserver.example/auth'
179+
tokenUrl: 'https://authserver.example/token'
180+
refreshUrl: 'https://authserver.example/refresh'
181+
scopes:
182+
'streetlights:on': Ability to switch lights on
183+
'streetlights:off': Ability to switch lights off
184+
'streetlights:dim': Ability to dim the lights
185+
openIdConnectWellKnown:
186+
type: openIdConnect
187+
openIdConnectUrl: 'https://authserver.example/.well-known'
188+
189+
parameters:
190+
streetlightId:
191+
description: The ID of the streetlight.
192+
schema:
193+
type: string
194+
195+
messageTraits:
196+
commonHeaders:
197+
headers:
198+
type: object
199+
properties:
200+
my-app-header:
201+
type: integer
202+
minimum: 0
203+
maximum: 100
204+
205+
operationTraits:
206+
kafka:
207+
bindings:
208+
kafka:
209+
clientId: my-app-id

0 commit comments

Comments
 (0)