From b0ba3b4ec4ffd6fae5bfdc447e333613e9d4311e Mon Sep 17 00:00:00 2001 From: samz Date: Tue, 5 Dec 2023 15:10:25 +0100 Subject: [PATCH] fix: default spec 3.0.0 doc (#883) --- apps/studio/src/state/files.state.ts | 44 +++++++++++++++------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/apps/studio/src/state/files.state.ts b/apps/studio/src/state/files.state.ts index cf004f43ff..cc9ce82dd8 100644 --- a/apps/studio/src/state/files.state.ts +++ b/apps/studio/src/state/files.state.ts @@ -4,49 +4,51 @@ const schema = localStorage.getItem('document') || `asyncapi: 3.0.0 info: title: Streetlights Kafka API - version: '1.0.0' - description: | - The Smartylighting Streetlights API allows you to remotely manage the city lights. + version: 1.0.0 + description: > + The Smartylighting Streetlights API allows you to remotely manage the city + lights. ### Check out its awesome features: - * Turn a specific streetlight on/off 🌃 + + * Turn a specific streetlight on/off 🌃 * Dim a specific streetlight 😎 * Receive real-time information about environmental lighting conditions 📈 license: name: Apache 2.0 - url: 'https://www.apache.org/licenses/LICENSE-2.0' + url: https://www.apache.org/licenses/LICENSE-2.0 defaultContentType: application/json servers: scram-connections: - host: 'test.mykafkacluster.org:18092' + host: test.mykafkacluster.org:18092 protocol: kafka-secure description: Test broker secured with scramSha256 security: - $ref: '#/components/securitySchemes/saslScram' tags: - - name: 'env:test-scram' + - name: env:test-scram description: >- This environment is meant for running internal tests through scramSha256 - - name: 'kind:remote' + - name: kind:remote description: This server is a remote server. Not exposed by the application - - name: 'visibility:private' + - name: visibility:private description: This resource is private and only available to certain users mtls-connections: - host: 'test.mykafkacluster.org:28092' + host: test.mykafkacluster.org:28092 protocol: kafka-secure description: Test broker secured with X509 security: - $ref: '#/components/securitySchemes/certs' tags: - - name: 'env:test-mtls' + - name: env:test-mtls description: This environment is meant for running internal tests through mtls - - name: 'kind:remote' + - name: kind:remote description: This server is a remote server. Not exposed by the application - - name: 'visibility:private' + - name: visibility:private description: This resource is private and only available to certain users channels: lightingMeasured: - address: 'smartylighting.streetlights.1.0.event.{streetlightId}.lighting.measured' + address: smartylighting.streetlights.1.0.event.{streetlightId}.lighting.measured messages: lightMeasured: $ref: '#/components/messages/lightMeasured' @@ -55,7 +57,7 @@ channels: streetlightId: $ref: '#/components/parameters/streetlightId' lightTurnOn: - address: 'smartylighting.streetlights.1.0.action.{streetlightId}.turn.on' + address: smartylighting.streetlights.1.0.action.{streetlightId}.turn.on messages: turnOn: $ref: '#/components/messages/turnOnOff' @@ -63,7 +65,7 @@ channels: streetlightId: $ref: '#/components/parameters/streetlightId' lightTurnOff: - address: 'smartylighting.streetlights.1.0.action.{streetlightId}.turn.off' + address: smartylighting.streetlights.1.0.action.{streetlightId}.turn.off messages: turnOff: $ref: '#/components/messages/turnOnOff' @@ -71,7 +73,7 @@ channels: streetlightId: $ref: '#/components/parameters/streetlightId' lightsDim: - address: 'smartylighting.streetlights.1.0.action.{streetlightId}.dim' + address: smartylighting.streetlights.1.0.action.{streetlightId}.dim messages: dimLight: $ref: '#/components/messages/dimLight' @@ -89,7 +91,7 @@ operations: traits: - $ref: '#/components/operationTraits/kafka' messages: - - $ref: '#/components/messages/lightMeasured' + - $ref: '#/channels/lightingMeasured/messages/lightMeasured' turnOn: action: send channel: @@ -97,7 +99,7 @@ operations: traits: - $ref: '#/components/operationTraits/kafka' messages: - - $ref: '#/components/messages/turnOnOff' + - $ref: '#/channels/lightTurnOn/messages/turnOn' turnOff: action: send channel: @@ -105,7 +107,7 @@ operations: traits: - $ref: '#/components/operationTraits/kafka' messages: - - $ref: '#/components/messages/turnOnOff' + - $ref: '#/channels/lightTurnOff/messages/turnOff' dimLight: action: send channel: @@ -113,7 +115,7 @@ operations: traits: - $ref: '#/components/operationTraits/kafka' messages: - - $ref: '#/components/messages/dimLight' + - $ref: '#/channels/lightsDim/messages/dimLight' components: messages: lightMeasured: