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/9afa506875
                sentTime:
                  Keywords:
                  - Type: String
                  - Value: &o0
                      Key: date-time
                  BaseUri: https://json-everything.net/b97a751ef5
                message:
                  Keywords:
                  - Type: Object
                  - Properties:
                      bookingNumber:
                        Keywords:
                        - Type: Integer
                        BaseUri: https://json-everything.net/be1f44741d
                      version:
                        Keywords:
                        - Type: Integer
                        BaseUri: https://json-everything.net/f02f471032
                      lastModificationDate:
                        Keywords:
                        - Type: String
                        - Value: *o0
                        BaseUri: https://json-everything.net/7a0ec68714
                  BaseUri: https://json-everything.net/cd0caca55c
            BaseUri: https://json-everything.net/4d5bb1cbcd
    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/e5fc7a89b8
                sentTime:
                  Keywords:
                  - Type: String
                  - Value:
                      Key: date-time
                  BaseUri: https://json-everything.net/1a935c8ad8
                message:
                  Keywords:
                  - Type: Object
                  - Properties:
                      bookings:
                        Keywords:
                        - Type: Array
                        - SingleSchema:
                            Keywords:
                            - Type: Object
                            - Properties:
                                bookingNumber:
                                  Keywords:
                                  - Type: Integer
                                  BaseUri: https://json-everything.net/827dd0d033
                                bookingSequence:
                                  Keywords:
                                  - Type: Integer
                                  BaseUri: https://json-everything.net/988f2b74ca
                                notificationType:
                                  Keywords:
                                  - Values:
                                    - Shift
                                    - Update
                                    - FullUpdate
                                    - ShiftFromReal
                                  BaseUri: https://json-everything.net/6c016287c2
                            BaseUri: https://json-everything.net/3f021f9892
                        BaseUri: https://json-everything.net/e15a272286
                  BaseUri: https://json-everything.net/3582b18929
            BaseUri: https://json-everything.net/1b5e268eef
    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
