Files
nats-python/openapi_templete/test/fixtures/asyncapi.yaml
T
2026-06-01 13:23:32 +02:00

44 lines
1.4 KiB
YAML

# .venv/bin/asyncapi-python-codegen asyncapi.yaml out --force
# asyncapi generate fromTemplate ./test/fixtures/asyncapi.yaml ./ -o ./out/project
# kouknout na FastStream
# https://nats.io/blog/nats-supported-by-faststream/#writing-app-code
# https://github.com/asyncapi/python-paho-template
# https://www.asyncapi.com/docs/tools/generator/generator-template
asyncapi: 3.0.0
info:
title: Temperature Service
version: 1.0.0
description: This service is in charge of processing all the events related to temperature.
servers:
dev:
host: test.mosquitto.org #in case you're using local mosquitto instance, change this value to localhost.
protocol: mqtt
channels:
temperatureChanged:
address: temperature/changed
messages:
temperatureChange:
description: Message that is being sent when the temperature in the bedroom changes.
payload:
$ref: '#/components/schemas/temperatureId'
description: Updates the bedroom temperature in the database when the temperatures drops or goes up.
operations:
temperatureChange:
action: receive
summary: Message sent to the broker when the temperature is changed.
channel:
$ref: '#/channels/temperatureChanged'
components:
schemas:
temperatureId:
type: object
additionalProperties: false
properties:
temperatureId:
type: string