From 8f29e8e522f59c91fbcab3a783450938062339bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Mon, 6 Jul 2020 15:59:50 +0200 Subject: [PATCH] create asyncapi yaml --- birbnetes.yml | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 birbnetes.yml diff --git a/birbnetes.yml b/birbnetes.yml new file mode 100644 index 0000000..1ab65af --- /dev/null +++ b/birbnetes.yml @@ -0,0 +1,70 @@ +asyncapi: 2.0.0 +info: + title: Birbnetes API + version: '1.0.0' + description: | + Async messages sent between major components of the Birbnetes system. + +servers: + production: + url: birb-rabbitmq:{port} + protocol: amqp + description: RabbitMQ + variables: + port: + description: Available in the birbnetes namespace of Kubernetes. + default: '5672' + +defaultContentType: application/json + +channels: + wave: + description: IDs of recieved sound files. + subscribe: + summary: Used to trigger processing of recieved waveforms. + operationId: receiveMeasurement + message: + $ref: '#/components/messages/wave' + output: + description: Confidence of AI + subscribe: + summary: Probaility attached to a particular sample. + operationId: receiveProbability + message: + $ref: '#/components/messages/output' + +components: + messages: + wave: + name: wave + title: Recieve ID + summary: Unique ID used to identify a particular sample in the system. + contentType: application/json + payload: + $ref: "#/components/schemas/wavePayload" + output: + name: output + title: Recieve ID + summary: Unique ID used to identify a particular sample in the system. + contentType: application/json + payload: + $ref: "#/components/schemas/probabilityPayload" + + schemas: + wavePayload: + type: object + properties: + tag: + type: string + description: Unique ID + probabilityPayload: + type: object + properties: + tag: + type: string + summary: Unique ID used to identify a particular sample in the system. + probability: + type: number + minimum: 0 + maximum: 1 + summary: Probability of detection