Skip to content

Commit b0ba3b4

Browse files
authored
fix: default spec 3.0.0 doc (#883)
1 parent 169c107 commit b0ba3b4

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

apps/studio/src/state/files.state.ts

+23-21
Original file line numberDiff line numberDiff line change
@@ -4,49 +4,51 @@ const schema =
44
localStorage.getItem('document') || `asyncapi: 3.0.0
55
info:
66
title: Streetlights Kafka API
7-
version: '1.0.0'
8-
description: |
9-
The Smartylighting Streetlights API allows you to remotely manage the city lights.
7+
version: 1.0.0
8+
description: >
9+
The Smartylighting Streetlights API allows you to remotely manage the city
10+
lights.
1011
### Check out its awesome features:
11-
* Turn a specific streetlight on/off 🌃
12+
13+
* Turn a specific streetlight on/off 🌃
1214
* Dim a specific streetlight 😎
1315
* Receive real-time information about environmental lighting conditions 📈
1416
license:
1517
name: Apache 2.0
16-
url: 'https://www.apache.org/licenses/LICENSE-2.0'
18+
url: https://www.apache.org/licenses/LICENSE-2.0
1719
defaultContentType: application/json
1820
servers:
1921
scram-connections:
20-
host: 'test.mykafkacluster.org:18092'
22+
host: test.mykafkacluster.org:18092
2123
protocol: kafka-secure
2224
description: Test broker secured with scramSha256
2325
security:
2426
- $ref: '#/components/securitySchemes/saslScram'
2527
tags:
26-
- name: 'env:test-scram'
28+
- name: env:test-scram
2729
description: >-
2830
This environment is meant for running internal tests through
2931
scramSha256
30-
- name: 'kind:remote'
32+
- name: kind:remote
3133
description: This server is a remote server. Not exposed by the application
32-
- name: 'visibility:private'
34+
- name: visibility:private
3335
description: This resource is private and only available to certain users
3436
mtls-connections:
35-
host: 'test.mykafkacluster.org:28092'
37+
host: test.mykafkacluster.org:28092
3638
protocol: kafka-secure
3739
description: Test broker secured with X509
3840
security:
3941
- $ref: '#/components/securitySchemes/certs'
4042
tags:
41-
- name: 'env:test-mtls'
43+
- name: env:test-mtls
4244
description: This environment is meant for running internal tests through mtls
43-
- name: 'kind:remote'
45+
- name: kind:remote
4446
description: This server is a remote server. Not exposed by the application
45-
- name: 'visibility:private'
47+
- name: visibility:private
4648
description: This resource is private and only available to certain users
4749
channels:
4850
lightingMeasured:
49-
address: 'smartylighting.streetlights.1.0.event.{streetlightId}.lighting.measured'
51+
address: smartylighting.streetlights.1.0.event.{streetlightId}.lighting.measured
5052
messages:
5153
lightMeasured:
5254
$ref: '#/components/messages/lightMeasured'
@@ -55,23 +57,23 @@ channels:
5557
streetlightId:
5658
$ref: '#/components/parameters/streetlightId'
5759
lightTurnOn:
58-
address: 'smartylighting.streetlights.1.0.action.{streetlightId}.turn.on'
60+
address: smartylighting.streetlights.1.0.action.{streetlightId}.turn.on
5961
messages:
6062
turnOn:
6163
$ref: '#/components/messages/turnOnOff'
6264
parameters:
6365
streetlightId:
6466
$ref: '#/components/parameters/streetlightId'
6567
lightTurnOff:
66-
address: 'smartylighting.streetlights.1.0.action.{streetlightId}.turn.off'
68+
address: smartylighting.streetlights.1.0.action.{streetlightId}.turn.off
6769
messages:
6870
turnOff:
6971
$ref: '#/components/messages/turnOnOff'
7072
parameters:
7173
streetlightId:
7274
$ref: '#/components/parameters/streetlightId'
7375
lightsDim:
74-
address: 'smartylighting.streetlights.1.0.action.{streetlightId}.dim'
76+
address: smartylighting.streetlights.1.0.action.{streetlightId}.dim
7577
messages:
7678
dimLight:
7779
$ref: '#/components/messages/dimLight'
@@ -89,31 +91,31 @@ operations:
8991
traits:
9092
- $ref: '#/components/operationTraits/kafka'
9193
messages:
92-
- $ref: '#/components/messages/lightMeasured'
94+
- $ref: '#/channels/lightingMeasured/messages/lightMeasured'
9395
turnOn:
9496
action: send
9597
channel:
9698
$ref: '#/channels/lightTurnOn'
9799
traits:
98100
- $ref: '#/components/operationTraits/kafka'
99101
messages:
100-
- $ref: '#/components/messages/turnOnOff'
102+
- $ref: '#/channels/lightTurnOn/messages/turnOn'
101103
turnOff:
102104
action: send
103105
channel:
104106
$ref: '#/channels/lightTurnOff'
105107
traits:
106108
- $ref: '#/components/operationTraits/kafka'
107109
messages:
108-
- $ref: '#/components/messages/turnOnOff'
110+
- $ref: '#/channels/lightTurnOff/messages/turnOff'
109111
dimLight:
110112
action: send
111113
channel:
112114
$ref: '#/channels/lightsDim'
113115
traits:
114116
- $ref: '#/components/operationTraits/kafka'
115117
messages:
116-
- $ref: '#/components/messages/dimLight'
118+
- $ref: '#/channels/lightsDim/messages/dimLight'
117119
components:
118120
messages:
119121
lightMeasured:

0 commit comments

Comments
 (0)