asyncapi: '3.0.0'
info:
  title: Public RabbitMQ
  version: '1.0.0'
  description: Defines the contract for publishing and consuming public messages via RabbitMQ, enabling asynchronous event-driven communication between distributed services.
servers:
  prod:
    host: publicapi.nt.cloud.bewotec.de
    protocol: amqp
    variables:
      port:
        enum:
        - "5672"
    bindings:
      amqp:
        bindingVersion: 0.3.0
  stage:
    host: publicapi.stage.nt.cloud.bewotec.de
    protocol: amqp
    variables:
      port:
        enum:
        - "5672"
    bindings:
      amqp:
        bindingVersion: 0.3.0
defaultContentType: application/json
channels:
  SuperPnrNotificationAMQP:
    address: 'unknown'
    messages:
      receiveSuperPnrNotificationRequest:
        payload:
          schemaFormat: application/vnd.aai.asyncapi+json;version=3.0.0
          schema:
            Keywords:
            - Type: Object
            - Properties:
                activityId:
                  Keywords:
                  - Type: String
                  BaseUri: https://json-everything.net/59de70dacf
                sentTime:
                  Keywords:
                  - Type: String
                  - Value: &o0
                      Key: date-time
                  BaseUri: https://json-everything.net/15c12e898a
                message:
                  Keywords:
                  - Type: Object
                  - Properties:
                      bookingNumber:
                        Keywords:
                        - Type: Integer
                        BaseUri: https://json-everything.net/8fa47661ff
                      version:
                        Keywords:
                        - Type: Integer
                        BaseUri: https://json-everything.net/846eb7d7f7
                      lastModificationDate:
                        Keywords:
                        - Type: String
                        - Value: *o0
                        BaseUri: https://json-everything.net/3833904a07
                  BaseUri: https://json-everything.net/fd9e1930ed
            BaseUri: https://json-everything.net/02e01ceeec
    servers:
    - $ref: '#/servers/prod'
    - $ref: '#/servers/stage'
    bindings:
      IsReference: true
      $ref: '#/components/channelBindings/SuperPnrNotification'
  FlightNotificationAMQP:
    address: 'unknown'
    messages:
      receiveFlightNotificationRequest:
        payload:
          schemaFormat: application/vnd.aai.asyncapi+json;version=3.0.0
          schema:
            Keywords:
            - Type: Object
            - Properties:
                activityId:
                  Keywords:
                  - Type: String
                  BaseUri: https://json-everything.net/11fe7dd7a2
                sentTime:
                  Keywords:
                  - Type: String
                  - Value:
                      Key: date-time
                  BaseUri: https://json-everything.net/da3da2262a
                message:
                  Keywords:
                  - Type: Object
                  - Properties:
                      bookings:
                        Keywords:
                        - Type: Array
                        - SingleSchema:
                            Keywords:
                            - Type: Object
                            - Properties:
                                bookingNumber:
                                  Keywords:
                                  - Type: Integer
                                  BaseUri: https://json-everything.net/89564d70dc
                                bookingSequence:
                                  Keywords:
                                  - Type: Integer
                                  BaseUri: https://json-everything.net/6b686b0c41
                                notificationType:
                                  Keywords:
                                  - Values:
                                    - Shift
                                    - Update
                                    - FullUpdate
                                    - ShiftFromReal
                                  BaseUri: https://json-everything.net/5ead5e3aa3
                            BaseUri: https://json-everything.net/c41a759efe
                        BaseUri: https://json-everything.net/9c8be6be62
                  BaseUri: https://json-everything.net/4fe38fa016
            BaseUri: https://json-everything.net/d07f9d07a6
    servers:
    - $ref: '#/servers/prod'
    - $ref: '#/servers/stage'
    bindings:
      IsReference: true
      $ref: '#/components/channelBindings/FlightNotification'
operations:
  receiveSuperPnrNotification:
    action: receive
    channel:
      $ref: '#/channels/SuperPnrNotificationAMQP'
    messages:
    - $ref: '#/channels/SuperPnrNotificationAMQP/messages/receiveSuperPnrNotificationRequest'
  receiveFlightNotification:
    action: receive
    channel:
      $ref: '#/channels/FlightNotificationAMQP'
    messages:
    - $ref: '#/channels/FlightNotificationAMQP/messages/receiveFlightNotificationRequest'
components:
  channelBindings:
    SuperPnrNotification:
      amqp:
        is: queue
        queue:
          name: SuperPnrNotification-[TenantName]-Listener
          durable: true
          vhost: public
        bindingVersion: 0.3.0
    FlightNotification:
      amqp:
        is: queue
        queue:
          name: FlightNotification-[TenantName]-Listener
          durable: true
          vhost: public
        bindingVersion: 0.3.0
