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/75a232c528
                sentTime:
                  Keywords:
                  - Type: String
                  - Value: &o0
                      Key: date-time
                  BaseUri: https://json-everything.net/0c828541a5
                message:
                  Keywords:
                  - Type: Object
                  - Properties:
                      bookingNumber:
                        Keywords:
                        - Type: Integer
                        BaseUri: https://json-everything.net/acf1b1ee68
                      version:
                        Keywords:
                        - Type: Integer
                        BaseUri: https://json-everything.net/8d2ec6e101
                      lastModificationDate:
                        Keywords:
                        - Type: String
                        - Value: *o0
                        BaseUri: https://json-everything.net/78fe0c19f3
                  BaseUri: https://json-everything.net/10f6df4779
            BaseUri: https://json-everything.net/247f36426e
    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/98ed5b779a
                sentTime:
                  Keywords:
                  - Type: String
                  - Value:
                      Key: date-time
                  BaseUri: https://json-everything.net/63a27dc68a
                message:
                  Keywords:
                  - Type: Object
                  - Properties:
                      bookings:
                        Keywords:
                        - Type: Array
                        - SingleSchema:
                            Keywords:
                            - Type: Object
                            - Properties:
                                bookingNumber:
                                  Keywords:
                                  - Type: Integer
                                  BaseUri: https://json-everything.net/402553a343
                                bookingSequence:
                                  Keywords:
                                  - Type: Integer
                                  BaseUri: https://json-everything.net/ca0caf2807
                                notificationType:
                                  Keywords:
                                  - Values:
                                    - Shift
                                    - Update
                                    - FullUpdate
                                    - ShiftFromReal
                                  BaseUri: https://json-everything.net/4ddc623564
                            BaseUri: https://json-everything.net/a35a2d9046
                        BaseUri: https://json-everything.net/968259972b
                  BaseUri: https://json-everything.net/19a29387ab
            BaseUri: https://json-everything.net/391b9b5fbf
    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
