Skip to content

Commit

Permalink
fix: update official invalid example to match tutorial (#848)
Browse files Browse the repository at this point in the history
Co-authored-by: Khuda Dad Nomani <[email protected]>
  • Loading branch information
derberg and KhudaDad414 authored Nov 15, 2023
1 parent ba785e1 commit 820e80f
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions apps/studio/src/examples/tutorials/invalid.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
# This invalid file exists solely for educational purposes, and if you come across it, here is the tutorial: https://www.asyncapi.com/docs/tutorials/studio-document-validation

asyncapi: '1.0.0'
asyncapi: 3.0.0
info:
title: Streetlights API
version: '1.0.0'
description: |
The Smartylighting Streetlights API allows you
to remotely manage the city lights.
license:
name: Apache 2.0
url: 'https://www.apache.org/licenses/LICENSE-2.0'

servers:
mosquitto:
url: mqtt://test.mosquitto.org
url: test.mosquitto.org
protocol: mqtt

channels:
light/measured:
publish:
summary: Inform about environmental lighting conditions for a particular streetlight.
operationId: onLightMeasured
message:
lightMeasured:
address: 'light/measured'
messages:
lightMeasuredMessage:
name: LightMeasured
payload:
type: object
Expand All @@ -30,6 +34,13 @@ channels:
minimum: 0
description: Light intensity measured in lumens.
sentAt:
type: integer
type: string
format: date-time
description: Date and time when the message was sent.

operations:
onLightMeasured:
action: 'receive'
summary: Inform about environmental lighting conditions for a particular streetlight.
channel:
$ref: '#/channels/lightMeasured'

0 comments on commit 820e80f

Please sign in to comment.