Skip to content

Latest commit

 

History

History

tests

Example

I would like to create a simple example of the usecase for the bundler and what it is trying to solve. Inspired by zbos, where there are multiple asyncapi files that define one particular component.

Consider two separate specification file that define two different interfaces. They have seperate channels and message payload for their respected interface, all bundler does is combine them together. Check the following files audio.yml, camera.yml, base.yml for examples.

For now bundler does not refence the $refs and rather does something like this ⬇️.

camera.yml
components:
  messages:
    keyMessage:
      payload:
        type: object
        properties:
          key:
            type: string
            description: Required random key
      name: KeyResult
      summary: Random key
      examples:
        - payload:
            key: ABCxyz  
audio.yml
components:
  messages:
    emptyMessage:
      payload:
        type: object
      name: EmptyMessage
      summary: Empty message

After combining:

all.yml
components:
  messages:
    emptyMessage:
      payload:
        type: object
      name: EmptyMessage
      summary: Empty message
    keyMessage:
      payload:
        type: object
        properties:
          key:
            type: string
            description: Required random key
      name: KeyResult
      summary: Random key
      examples:
        - payload:
            key: ABCxyz