From f9d7743a27647b43e724e75a917c4ba20b73f9ea Mon Sep 17 00:00:00 2001 From: fmvilas Date: Wed, 5 Dec 2018 09:20:12 +0100 Subject: [PATCH] Add streetlights docs --- test/docs/streetlights.yml | 49 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 test/docs/streetlights.yml diff --git a/test/docs/streetlights.yml b/test/docs/streetlights.yml new file mode 100644 index 000000000..004318c6e --- /dev/null +++ b/test/docs/streetlights.yml @@ -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.