Skip to content

Instantly share code, notes, and snippets.

@jonaslagoni
Created April 24, 2020 21:23
Show Gist options
  • Save jonaslagoni/bf1802cd3a8b9160db8f18d0c23e8030 to your computer and use it in GitHub Desktop.
Save jonaslagoni/bf1802cd3a8b9160db8f18d0c23e8030 to your computer and use it in GitHub Desktop.
AsyncAPI channel mismatch example
asyncapi: '2.0.0'
info:
title: Streetlights, some kind of frontend to show measured light levels
version: '1.0.0'
channels:
smartylighting/streetlights/1/0/event/Iighting/measured:
description: Any measured values from the streetlight will be published through this channel.
subscribe:
operationId: subscribeLightMeasurement
message:
name: lightMeasured
title: Light measured
summary: Inform about environmental lighting conditions of a particular streetlight.
contentType: application/json
payload:
type: object
properties:
lumens:
type: integer
minimum: 0
description: Light intensity measured in lumens.
asyncapi: '2.0.0'
info:
title: Streetlights, lightning controller
version: '1.0.0'
channels:
smartylighting/streetlights/1/0/event/lighting/measured:
description: Any measured values from the streetlight will be published through this channel.
publish:
operationId: publishLightMeasurement
message:
name: lightMeasured
title: Light measured
summary: Inform about environmental lighting conditions of a particular streetlight.
contentType: application/json
payload:
type: object
properties:
lumens:
type: integer
minimum: 0
description: Light intensity measured in lumens.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment