asyncapi/bundler

AsyncAPI spec v3 support in Bundler

jonaslagoni opened this issue ยท 10 comments

Reason/Context

This Issue is used to track changes needed to support AsyncAPI v3. As a code owner, please edit this list of TODO tasks in order to properly track the progress ๐Ÿ™‚ Once this issue is closed it means that v3 is now fully supported in this library.

Remaining tasks:

  • Update to support v3 structures for bundling

cc codeowners @Souvikns @derberg

Would be really cool to have this library work out the gate when we release v3, are any of you interested in scheduling a public call specifically to discuss how to enable this?

If you have any questions about how it can be achieved or v3-specific stuff I can help answer those in the meeting to enable you to progress with this ๐Ÿ™‚

Let me know if it has any interest.

Would be really cool to have this library work out the gate when we release v3, are any of you interested in scheduling a public call specifically to discuss how to enable this?

Sure @jonaslagoni let me read up on spec3 and see what needs to be changed in bundler to support it, Maybe we can discuss about this at the next spec 3.0 meeting

For sure, feel free to bring it up ๐Ÿ‘

I was trying to figure out what needs to be changed in the bundler for it to support spec v3.

Currently

  • bundler parses the channels and looks for $ref's in the message object
  • resolves the $ref to either the message or to the component object and updates the $ref accordingly.

With V3

The only difference in our case is that now we can have multiple message objects so the only thing that changes is how we look for the message components. operations can have messages as well so we need to parse that as well, but we only resolve it if the $ref is outside the current spec i.e. we are referencing a message from a different file.

cc @jonaslagoni

Don't think this affects bundler currently, as it only looks for message references and nothing else.

path: '$.channels.*.*.message',

@jonaslagoni working on a PR, will create a separate logic for spec 3.0 and add a check for the spec inputted in bundler to either use the current logic or the new one.

๐ŸŽ‰ This issue has been resolved in version 0.4.0 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€

I am trying to use the bundle command of the Async API CLI tool v1.4.11. It gives be the error "One of the files you tried to bundle is AsyncAPI v3 format, the bundle command does not support it yet" and refers to this issue #133.

Since this issue is closed, I am confused. Maybe I am in the wrong place looking for v3 support for the bundle command? Or missing something obvious? :)

In case you got redirected here looking for v3 support for the bundle CLI command, please check the following issue: asyncapi/cli#1137