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