add own includes and imports
This commit is contained in:
+8
-6
@@ -55,6 +55,13 @@ components:
|
||||
$ref: '#/components/schemas/OrderPlaced'
|
||||
|
||||
schemas:
|
||||
Status:
|
||||
type: string
|
||||
enum:
|
||||
- created
|
||||
- pending
|
||||
- confirmed
|
||||
|
||||
OrderCreated:
|
||||
$id: OrderCreated
|
||||
title: OrderCreated
|
||||
@@ -76,13 +83,8 @@ components:
|
||||
format: date-time
|
||||
example: "2025-06-03T12:00:00Z"
|
||||
status:
|
||||
type: string
|
||||
enum:
|
||||
- created
|
||||
- pending
|
||||
- confirmed
|
||||
$ref: '#/components/schemas/Status'
|
||||
default: created
|
||||
|
||||
OrderPlaced:
|
||||
$id: OrderPlaced
|
||||
title: OrderPlaced
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
# 1
|
||||
import paho.mqtt.client as mqtt
|
||||
# 2
|
||||
mqttBroker = "test.mosquitto.org"
|
||||
|
||||
class TemperatureServiceClient:
|
||||
def __init__(self):
|
||||
# 3
|
||||
self.client = mqtt.Client()
|
||||
# 4
|
||||
self.client.connect(mqttBroker)
|
||||
|
||||
|
||||
def sendTemperatureChange(self, id):
|
||||
# 5
|
||||
topic = "temperature/changed"
|
||||
# 6
|
||||
self.client.publish(topic, id)
|
||||
Reference in New Issue
Block a user