Skip to content

Commit

Permalink
Merge pull request #23 from asyncapi/feature/add-streetlights-doc
Browse files Browse the repository at this point in the history
Add streetlights doc
  • Loading branch information
rmelian authored Dec 5, 2018
2 parents 6f59013 + f9d7743 commit bb53fda
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions test/docs/streetlights.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
asyncapi: '1.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'
baseTopic: smartylighting.streetlights.1.0
servers:
- url: test.mosquitto.org
scheme: mqtt
description: Test broker
variables:
port:
description: Secure connection (TLS) is available through port 8883.
default: '1883'
enum:
- '1883'
- '8883'
topics:
event.lighting.measured:
x-service-name: measures
publish:
$ref: '#/components/messages/lightMeasured'
subscribe:
$ref: '#/components/messages/lightMeasured'
components:
messages:
lightMeasured:
summary: Inform about environmental lighting conditions for a particular streetlight.
payload:
$ref: "#/components/schemas/lightMeasuredPayload"
schemas:
lightMeasuredPayload:
type: object
properties:
lumens:
type: integer
minimum: 0
description: Light intensity measured in lumens.
sentAt:
$ref: "#/components/schemas/sentAt"
sentAt:
type: string
format: date-time
description: Date and time when the message was sent.

0 comments on commit bb53fda

Please sign in to comment.