71 lines
1.6 KiB
YAML
71 lines
1.6 KiB
YAML
# .venv/bin/asyncapi-python-codegen asyncapi.yaml out --force-write
|
|
# 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
|
|
# https://www.asyncapi.com/docs/tools/generator/generator-template --force-write
|
|
# https://pypi.org/project/asyncapi-python/
|
|
# https://github.com/G-USI/asyncapi-python
|
|
|
|
|
|
asyncapi: 3.0.0
|
|
info:
|
|
title: Job Events
|
|
version: 1.0.0
|
|
|
|
servers:
|
|
nats_localhost:
|
|
host: localhost:4222
|
|
protocol: nats
|
|
|
|
channels:
|
|
run_test:
|
|
address: mtr_test.run_test
|
|
messages:
|
|
run_test:
|
|
$ref: '#/components/messages/mtr_request'
|
|
return_uuid:
|
|
address: null
|
|
messages:
|
|
run_test:
|
|
$ref: '#/components/messages/mtr_uuid'
|
|
|
|
operations:
|
|
get_mtr_test:
|
|
action: send
|
|
channel:
|
|
$ref: '#/channels/run_test'
|
|
reply:
|
|
address:
|
|
location: "$message.header#/replayTo"
|
|
channel:
|
|
$ref: '#/channels/return_uuid'
|
|
|
|
components:
|
|
schemas:
|
|
mtr_request_schema:
|
|
payload:
|
|
type: object
|
|
properties:
|
|
to_server:
|
|
type: string
|
|
mtr_sleep:
|
|
type: integer
|
|
mtr_uuid_schema:
|
|
payload:
|
|
type: object
|
|
properties:
|
|
uuid:
|
|
type: string
|
|
messages:
|
|
mtr_request:
|
|
name: mtr_request
|
|
payload:
|
|
type: object
|
|
required:
|
|
- to_server
|
|
$ref: '#/components/schemas/mtr_request_schema'
|
|
mtr_uuid:
|
|
payload:
|
|
$ref: '#/components/schemas/mtr_uuid_schema'
|