Skip to content

CLI-3551: asyncapi export generates an invalid file with $ref paths that are incorrect #3056

Description

@TimButterfield

I've been evaluating the async api export from schema registry to see I can line up Confluent, AsyncApi and EventCatalogue to help my client document their estate. However, the file that confluent asyncapi export command generates isn't valid.

Steps that I used to produce an error

  1. Push event that has an object hierarchy (see below) to a new topic with scheme generation on, such a new schema is registered.
  2. Perform all of the pre steps from the Confluent docs about choosing the right environment / cluster / schema reg in the Cli.
  3. Run the Cli async api export command to generate a file
  4. Install the AsyncApi-Preview tool for VSCode
  5. After the file has generated, open the file in VS code use the VS command palette to run AsyncApi Preview
  6. Note the errors generated

"line {line number}: '#/definitions/{typenamehere}' does not exist"

The path should be '#/components/messages/{messagenamehere}/payload/definitions/{typenamehere}'

NOTE: The same error occurs if you take the file generated and view on the AsyncApi page in the Studio tool.

Example C# object

`public class Foo
{
public Bar Bar {get; set;}
}

public class Bar
{
....
}`

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions