confluentinc / confluentinc/cli
CLI-3551: asyncapi export generates an invalid file with $ref paths that are incorrect
- Dominant language
- Go
- Stars
- 80
- Forks
- 35
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 33
Description
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
{
....
}`
Contributor guide
Assessment
This issue has not been assessed yet.